mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 12:17:06 +00:00
Send real JID in more of presences
This commit is contained in:
parent
48cd525b8e
commit
6a8a96a4f4
1 changed files with 5 additions and 0 deletions
|
|
@ -459,6 +459,7 @@ func (c *Client) ProcessStatusUpdate(chatID int64, status string, show string, o
|
||||||
}
|
}
|
||||||
|
|
||||||
c.locks.mucCacheLock.Lock()
|
c.locks.mucCacheLock.Lock()
|
||||||
|
chatJid := strconv.FormatInt(chatID, 10) + "@" + gateway.Jid.Full()
|
||||||
for mucId, state := range c.mucCache {
|
for mucId, state := range c.mucCache {
|
||||||
member, ok := state.Members[chatID]
|
member, ok := state.Members[chatID]
|
||||||
if ok {
|
if ok {
|
||||||
|
|
@ -468,6 +469,7 @@ func (c *Client) ProcessStatusUpdate(chatID int64, status string, show string, o
|
||||||
gateway.SPFrom(sMucId),
|
gateway.SPFrom(sMucId),
|
||||||
gateway.SPResource(member.Nickname),
|
gateway.SPResource(member.Nickname),
|
||||||
gateway.SPMUCAffiliation(member.Affiliation),
|
gateway.SPMUCAffiliation(member.Affiliation),
|
||||||
|
gateway.SPMUCJid(chatJid),
|
||||||
)
|
)
|
||||||
err := c.sendPresence(newMucArgs...)
|
err := c.sendPresence(newMucArgs...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -615,6 +617,7 @@ func (c *Client) updateMUCsNickname(memberID int64, newNickname string) {
|
||||||
c.locks.mucCacheLock.Lock()
|
c.locks.mucCacheLock.Lock()
|
||||||
defer c.locks.mucCacheLock.Unlock()
|
defer c.locks.mucCacheLock.Unlock()
|
||||||
|
|
||||||
|
realJid := strconv.FormatInt(memberID, 10) + "@" + gateway.Jid.Full()
|
||||||
for mucId, state := range c.mucCache {
|
for mucId, state := range c.mucCache {
|
||||||
oldMember, ok := state.Members[memberID]
|
oldMember, ok := state.Members[memberID]
|
||||||
if ok {
|
if ok {
|
||||||
|
|
@ -638,6 +641,7 @@ func (c *Client) updateMUCsNickname(memberID int64, newNickname string) {
|
||||||
gateway.SPMUCAffiliation(oldMember.Affiliation),
|
gateway.SPMUCAffiliation(oldMember.Affiliation),
|
||||||
gateway.SPMUCNick(newNickname),
|
gateway.SPMUCNick(newNickname),
|
||||||
gateway.SPMUCStatusCodes(unavailableStatusCodes),
|
gateway.SPMUCStatusCodes(unavailableStatusCodes),
|
||||||
|
gateway.SPMUCJid(realJid),
|
||||||
)
|
)
|
||||||
c.sendPresence(
|
c.sendPresence(
|
||||||
gateway.SPFrom(sMucId),
|
gateway.SPFrom(sMucId),
|
||||||
|
|
@ -645,6 +649,7 @@ func (c *Client) updateMUCsNickname(memberID int64, newNickname string) {
|
||||||
gateway.SPImmed(true),
|
gateway.SPImmed(true),
|
||||||
gateway.SPMUCAffiliation(oldMember.Affiliation),
|
gateway.SPMUCAffiliation(oldMember.Affiliation),
|
||||||
gateway.SPMUCStatusCodes(availableStatusCodes),
|
gateway.SPMUCStatusCodes(availableStatusCodes),
|
||||||
|
gateway.SPMUCJid(realJid),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue