aboutsummaryrefslogtreecommitdiff
path: root/xmpp/gateway/gateway.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-10-04 01:56:37 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-10-04 01:56:37 +0300
commit1e7e761c6ce7bda3850ed23d0e64d884a28f60a7 (patch)
tree4db6cc5ffc62ac91f4e662b2546a17fb62621e00 /xmpp/gateway/gateway.go
parentb8a57c06b646edbad340c9e1c6c79e11a8a666e3 (diff)
Reflect name change of Telegram user in all MUCs
Diffstat (limited to 'xmpp/gateway/gateway.go')
-rw-r--r--xmpp/gateway/gateway.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go
index 1a37cc7..9007f6b 100644
--- a/xmpp/gateway/gateway.go
+++ b/xmpp/gateway/gateway.go
@@ -328,6 +328,9 @@ var SPImmed = args.NewBool(args.Default(true))
// SPMUCAffiliation is a XEP-0045 MUC affiliation
var SPMUCAffiliation = args.NewString()
+// SPMUCNick is a XEP-0045 MUC user nick
+var SPMUCNick = args.NewString()
+
// SPMUCJid is a real jid of a MUC member
var SPMUCJid = args.NewString()
@@ -398,6 +401,9 @@ func newPresence(bareJid string, to string, args ...args.V) stanza.Presence {
Role: affilationToRole(affiliation),
},
}
+ if SPMUCNick.IsSet(args) {
+ userExt.Item.Nick = SPMUCNick.Get(args)
+ }
if SPMUCJid.IsSet(args) {
userExt.Item.Jid = SPMUCJid.Get(args)
}