summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorRoger Planas <roger.planas@isode.com>2017-02-14 14:50:24 (GMT)
committerRoger Planas <roger.planas@isode.com>2017-02-14 15:26:32 (GMT)
commit2a0582368f31d6a1a6353ebdd1a15f429dbda882 (patch)
tree051cac6a4085e7d340082e3b4a60d36bd0233a12 /Sluift
parent72824c12ab6c15501e6e17c15465d9b27c6f7e1b (diff)
downloadswift-2a0582368f31d6a1a6353ebdd1a15f429dbda882.zip
swift-2a0582368f31d6a1a6353ebdd1a15f429dbda882.tar.bz2
Sluift: Add shortcut for get disco_info
So instead of doing something like this local features = client:get({ to = to, query = "<query xmlns='"..sluift.disco.features.DISCO_INFO.."'"..node.."/>" })['features'] we can now do something like this local features = client:get_disco_info({ to = to })['features'] That is, avoid raw calls. Test-information: Updated test calls to use new API and noticed no different behaviour to old code. Change-Id: I0d9a7c25c0f56499487f8aa0e67e30e9fa1b56ac
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/core.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Sluift/core.lua b/Sluift/core.lua
index aef2506..89c96ba 100644
--- a/Sluift/core.lua
+++ b/Sluift/core.lua
@@ -1,5 +1,5 @@
--[[
- Copyright (c) 2013-2014 Isode Limited.
+ Copyright (c) 2013-2017 Isode Limited.
All rights reserved.
See the COPYING file for more information.
--]]
@@ -757,7 +757,7 @@ register_help(Client.process_events)
-- client:set_command{to = 'alice@wonderland.lit', command = { type = 'execute', node = 'uptime' }}
--
local get_set_shortcuts = {
- get = {'software_version', 'disco_items', 'xml', 'dom', 'vcard', 'mam'},
+ get = {'software_version', 'disco_items', 'disco_info', 'xml', 'dom', 'vcard', 'mam'},
set = {'command', 'vcard', 'mam'}
}
for query_action, query_types in pairs(get_set_shortcuts) do