mod_invites_register: Push invitee contact entry to inviter (Thanks gerald)
authorKim Alvefur <zash@zash.se>
Tue, 15 Mar 2022 21:59:51 +0100
changeset 4911 4aecf78cc39d
parent 4910 f07c9a6f19b3
child 4912 44be2c6087f3
mod_invites_register: Push invitee contact entry to inviter (Thanks gerald) Invitee would not show up in the roster of the invite creator unless they fetch their roster afterwards. Fixes #1715
mod_invites_register/mod_invites_register.lua
--- a/mod_invites_register/mod_invites_register.lua	Tue Mar 08 11:57:25 2022 +0000
+++ b/mod_invites_register/mod_invites_register.lua	Tue Mar 15 21:59:51 2022 +0100
@@ -137,6 +137,7 @@
 	if inviter_username then
 		module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username);
 		subscribe_both(module.host, inviter_username, contact_username);
+		rostermanager.roster_push(inviter_username, module.host, contact_username.."@"..module.host);
 	end
 
 	if validated_invite.additional_data then