Fix ID-less occupant nickname when missing from group members list

This commit is contained in:
Bohdan Horbeshko 2025-07-05 13:57:27 -04:00
parent 3b01b1de70
commit f5a6cbf199

View file

@ -661,14 +661,6 @@ func (c *Client) DestroyMUC(chatId int64) error {
return nil
}
func (c *Client) getFullName(user *client.User) string {
fullName := user.FirstName
if user.LastName != "" {
fullName = fullName + " " + user.LastName
}
return fullName
}
func (c *Client) sendMUCStatuses(chatID int64) {
c.locks.mucCacheLock.Lock()
defer c.locks.mucCacheLock.Unlock()
@ -691,7 +683,7 @@ func (c *Client) updateMUCOccupants(mucState *MUCState, chatID int64, members []
myNickname := "me"
var myJid string
if c.me != nil {
myNickname = c.getFullName(c.me)
myNickname = c.GetMUCNickname(c.me.Id)
myJid = gateway.CHATJID(c.me.Id, true)
}
myAffiliation := "member"