Call OpenChat/CloseChat on MUC join/leave to achieve receiving supergroup updates

This commit is contained in:
Bohdan Horbeshko 2025-07-22 14:25:29 -04:00
parent 422ac9dea6
commit a52bede7f9

View file

@ -622,6 +622,10 @@ func (c *Client) JoinMUC(chatId int64, resource string, limit *MessageLimit) {
}
c.sendMUCSubject(chatId, resource)
c.client.OpenChat(&client.OpenChatRequest{
ChatId: chatId,
})
}
// LeaveMUC removes MUC date from the cache
@ -639,6 +643,10 @@ func (c *Client) LeaveMUC(chatId int64, resource string) {
if len(mucState.Resources) == 0 {
delete(c.mucCache, chatId)
}
c.client.CloseChat(&client.CloseChatRequest{
ChatId: chatId,
})
}
// DestroyMUC removes everyone from the MUC