Software /
code /
verse
Comparison
plugins/roster.lua @ 271:c9d8628a61cc
plugins.roster: Change variable name to what's used in XMPP-IM
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Jan 2012 22:17:39 +0100 |
parent | 250:a5ac643a7fd6 |
child | 276:3d8442f7f034 |
comparison
equal
deleted
inserted
replaced
270:6a9a99aa062b | 271:c9d8628a61cc |
---|---|
63 items = roster.items, | 63 items = roster.items, |
64 }; | 64 }; |
65 end | 65 end |
66 | 66 |
67 -- should this be add_contact(item, callback) instead? | 67 -- should this be add_contact(item, callback) instead? |
68 function roster:add_contact(jid, nick, groups, callback) | 68 function roster:add_contact(jid, name, groups, callback) |
69 local item = { jid = jid, name = nick, groups = groups }; | 69 local item = { jid = jid, name = name, groups = groups }; |
70 local stanza = verse.iq({ type = "set" }) | 70 local stanza = verse.iq({ type = "set" }) |
71 :tag("query", { xmlns = xmlns_roster }) | 71 :tag("query", { xmlns = xmlns_roster }) |
72 :add_child(item_lua2xml(item)); | 72 :add_child(item_lua2xml(item)); |
73 stream:send_iq(stanza, function (reply) | 73 stream:send_iq(stanza, function (reply) |
74 if not callback then return end | 74 if not callback then return end |