aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-18 08:17:25 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-09-18 08:17:25 +0300
commit93abbe834ee10bf243af9538202bd435e9be1cb6 (patch)
treeb00632d4435d3e3888a8ff08ebad57aeeaa0dcd3 /telegram/utils.go
parent6c65ef9988dc786a6b634e05f4e40aacdf9191cb (diff)
Send real JID for room occupants
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index a281a90..9ecf7af 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -302,6 +302,7 @@ func (c *Client) SendMUCStatuses(chatID int64) {
})
if err == nil {
chatIDString := strconv.FormatInt(chatID, 10)
+ gatewayJidSuffix := "@" + gateway.Jid.Full()
myNickname := "me"
if c.me != nil {
@@ -337,7 +338,8 @@ func (c *Client) SendMUCStatuses(chatID int64) {
gateway.SPFrom(chatIDString),
gateway.SPResource(nickname),
gateway.SPImmed(true),
- gateway.SPAffiliation(affiliation),
+ gateway.SPMUCAffiliation(affiliation),
+ gateway.SPMUCJid(strconv.FormatInt(senderId, 10) + gatewayJidSuffix),
)
}
@@ -348,8 +350,8 @@ func (c *Client) SendMUCStatuses(chatID int64) {
gateway.SPFrom(chatIDString),
gateway.SPResource(myNickname),
gateway.SPImmed(true),
- gateway.SPAffiliation(myAffiliation),
- gateway.SPMUCStatusCodes([]uint16{110, 210}),
+ gateway.SPMUCAffiliation(myAffiliation),
+ gateway.SPMUCStatusCodes([]uint16{100, 110, 210}),
)
}
}