|
|
|
@ -240,8 +240,11 @@ var SPResource = args.NewString()
|
|
|
|
|
// SPImmed skips queueing
|
|
|
|
|
var SPImmed = args.NewBool(args.Default(true))
|
|
|
|
|
|
|
|
|
|
// SPAffiliation is a XEP-0045 MUC affiliation
|
|
|
|
|
var SPAffiliation = args.NewString()
|
|
|
|
|
// SPMUCAffiliation is a XEP-0045 MUC affiliation
|
|
|
|
|
var SPMUCAffiliation = args.NewString()
|
|
|
|
|
|
|
|
|
|
// SPMUCJid is a real jid of a MUC member
|
|
|
|
|
var SPMUCJid = args.NewString()
|
|
|
|
|
|
|
|
|
|
// SPMUCStatusCodes is a set of XEP-0045 MUC status codes
|
|
|
|
|
var SPMUCStatusCodes = args.New()
|
|
|
|
@ -301,8 +304,8 @@ func newPresence(bareJid string, to string, args ...args.V) stanza.Presence {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if SPAffiliation.IsSet(args) {
|
|
|
|
|
affiliation := SPAffiliation.Get(args)
|
|
|
|
|
if SPMUCAffiliation.IsSet(args) {
|
|
|
|
|
affiliation := SPMUCAffiliation.Get(args)
|
|
|
|
|
if affiliation != "" {
|
|
|
|
|
userExt := extensions.PresenceXMucUserExtension{
|
|
|
|
|
Item: extensions.PresenceXMucUserItem{
|
|
|
|
@ -310,6 +313,9 @@ func newPresence(bareJid string, to string, args ...args.V) stanza.Presence {
|
|
|
|
|
Role: affilationToRole(affiliation),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
if SPMUCJid.IsSet(args) {
|
|
|
|
|
userExt.Item.Jid = SPMUCJid.Get(args)
|
|
|
|
|
}
|
|
|
|
|
if SPMUCStatusCodes.IsSet(args) {
|
|
|
|
|
statusCodes := SPMUCStatusCodes.Get(args).([]uint16)
|
|
|
|
|
for _, statusCode := range statusCodes {
|
|
|
|
|