File: MAMSupportedFields.lua

package info (click to toggle)
swift-im 5.0~alpha2.145.g12d031cf8%2Bdfsg-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,256 kB
  • sloc: cpp: 134,640; python: 2,701; sh: 774; xml: 561; javascript: 69; makefile: 59
file content (18 lines) | stat: -rw-r--r-- 361 bytes parent folder | download
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()