mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 04:07:07 +00:00
Call OpenChat/CloseChat on MUC join/leave to achieve receiving supergroup updates
This commit is contained in:
parent
422ac9dea6
commit
a52bede7f9
1 changed files with 8 additions and 0 deletions
|
|
@ -622,6 +622,10 @@ func (c *Client) JoinMUC(chatId int64, resource string, limit *MessageLimit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
c.sendMUCSubject(chatId, resource)
|
c.sendMUCSubject(chatId, resource)
|
||||||
|
|
||||||
|
c.client.OpenChat(&client.OpenChatRequest{
|
||||||
|
ChatId: chatId,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// LeaveMUC removes MUC date from the cache
|
// LeaveMUC removes MUC date from the cache
|
||||||
|
|
@ -639,6 +643,10 @@ func (c *Client) LeaveMUC(chatId int64, resource string) {
|
||||||
if len(mucState.Resources) == 0 {
|
if len(mucState.Resources) == 0 {
|
||||||
delete(c.mucCache, chatId)
|
delete(c.mucCache, chatId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.client.CloseChat(&client.CloseChatRequest{
|
||||||
|
ChatId: chatId,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// DestroyMUC removes everyone from the MUC
|
// DestroyMUC removes everyone from the MUC
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue