summaryrefslogtreecommitdiffstats
blob: 041792406fee2a4fe5d723186d88d0daca9d7809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- Retrieving form fields
-- Usage: ./sluift MAMSupportedFields.lua <jid> <password>

sluift.debug = true

c = sluift.new_client(arg[1], arg[2])

c:connect();

mam_result = c:get_mam{}

for i=1,#mam_result.form.fields do
	if mam_result.form.fields[i].type ~= "hidden" then
		print("Server supports: " .. mam_result.form.fields[i].name)
	end
end

c:disconnect()