aboutsummaryrefslogtreecommitdiff
path: root/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp')
-rw-r--r--xmpp/extensions/extensions.go1
-rw-r--r--xmpp/gateway/gateway.go6
2 files changed, 7 insertions, 0 deletions
diff --git a/xmpp/extensions/extensions.go b/xmpp/extensions/extensions.go
index 8ff034d..45ab839 100644
--- a/xmpp/extensions/extensions.go
+++ b/xmpp/extensions/extensions.go
@@ -225,6 +225,7 @@ type PresenceXMucUserItem struct {
XMLName xml.Name `xml:"item"`
Affiliation string `xml:"affiliation,attr"`
Jid string `xml:"jid,attr"`
+ Nick string `xml:"nick,attr,omitempty"`
Role string `xml:"role,attr"`
}
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)
}