Mercurial > prosody-modules
comparison mod_invites_adhoc/mod_invites_adhoc.lua @ 4397:6e0aa163298f
mod_invites_adhoc: also add tracking information to contact invites
They can be account invites, too, if allow_contact_invites is true.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Tue, 26 Jan 2021 17:17:36 +0100 |
parents | df9bb3d861f9 |
children | 44f6537f6427 |
comparison
equal
deleted
inserted
replaced
4396:de55e1475808 | 4397:6e0aa163298f |
---|---|
43 -- not be valid for registration on the current server, only for establishing a roster | 43 -- not be valid for registration on the current server, only for establishing a roster |
44 -- subscription. | 44 -- subscription. |
45 module:provides("adhoc", new_adhoc("Create new contact invite", "urn:xmpp:invite#invite", | 45 module:provides("adhoc", new_adhoc("Create new contact invite", "urn:xmpp:invite#invite", |
46 function (_, data) | 46 function (_, data) |
47 local username = split_jid(data.from); | 47 local username = split_jid(data.from); |
48 local invite = invites.create_contact(username, allow_user_invites); | 48 local invite = invites.create_contact(username, allow_user_invites, { |
49 source = data.from | |
50 }); | |
49 --TODO: check errors | 51 --TODO: check errors |
50 return { | 52 return { |
51 status = "completed"; | 53 status = "completed"; |
52 form = { | 54 form = { |
53 layout = invite_result_form; | 55 layout = invite_result_form; |