Mercurial > prosody-hg
comparison plugins/mod_invites_register.lua @ 12391:a15647d42880 0.12
mod_invites_register: Push invitee contact entry to inviter
Invitee would not show up in the roster of the invite creator unless
they fetch their roster afterwards.
Fixes #1715
Thanks gerald
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 15 Mar 2022 21:59:51 +0100 |
| parents | c980210ca095 |
| children | 74b9e05af71e |
comparison
equal
deleted
inserted
replaced
| 12390:71b5c9b8b07a | 12391:a15647d42880 |
|---|---|
| 139 validated_invite:use(); | 139 validated_invite:use(); |
| 140 | 140 |
| 141 if inviter_username then | 141 if inviter_username then |
| 142 module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username); | 142 module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username); |
| 143 subscribe_both(module.host, inviter_username, contact_username); | 143 subscribe_both(module.host, inviter_username, contact_username); |
| 144 rostermanager.roster_push(inviter_username, module.host, contact_username.."@"..module.host); | |
| 144 end | 145 end |
| 145 | 146 |
| 146 if validated_invite.additional_data then | 147 if validated_invite.additional_data then |
| 147 module:log("debug", "Importing roles from invite"); | 148 module:log("debug", "Importing roles from invite"); |
| 148 local roles = validated_invite.additional_data.roles; | 149 local roles = validated_invite.additional_data.roles; |
