diff 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
line wrap: on
line diff
--- a/mod_invites_adhoc/mod_invites_adhoc.lua	Tue Jan 26 16:10:11 2021 +0100
+++ b/mod_invites_adhoc/mod_invites_adhoc.lua	Tue Jan 26 17:17:36 2021 +0100
@@ -45,7 +45,9 @@
 module:provides("adhoc", new_adhoc("Create new contact invite", "urn:xmpp:invite#invite",
 		function (_, data)
 			local username = split_jid(data.from);
-			local invite = invites.create_contact(username, allow_user_invites);
+			local invite = invites.create_contact(username, allow_user_invites, {
+				source = data.from
+			});
 			--TODO: check errors
 			return {
 				status = "completed";