|
|
|
@ -155,7 +155,11 @@ func (c *Client) updateNewChat(update *client.UpdateNewChat) {
|
|
|
|
|
isChannel = typeSupergroup.IsChannel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if !(isChannel && update.Chat.LastReadInboxMessageId == 0) {
|
|
|
|
|
// don't subscribe to channel posters
|
|
|
|
|
if !((isChannel && update.Chat.LastReadInboxMessageId == 0) ||
|
|
|
|
|
// don't subscribe to chats with no conversation
|
|
|
|
|
// (manual adding will trigger a subscribe anyway)
|
|
|
|
|
(update.Chat.LastReadInboxMessageId == 0 && update.Chat.LastReadOutboxMessageId == 0)) {
|
|
|
|
|
gateway.SendPresence(
|
|
|
|
|
c.xmpp,
|
|
|
|
|
c.jid,
|
|
|
|
|