fix(community-chats): fix community chats getting duplicated
Fixes #4859 and #4858
This commit is contained in:
parent
26477afb3b
commit
f7860310db
|
@ -746,8 +746,9 @@ method addChatIfDontExist*(self: Module,
|
||||||
mailserversService: mailservers_service.Service,
|
mailserversService: mailservers_service.Service,
|
||||||
setChatAsActive: bool = true) =
|
setChatAsActive: bool = true) =
|
||||||
|
|
||||||
if(belongsToCommunity and self.controller.getMySectionId() != chat.communityId or
|
let sectionId = self.controller.getMySectionId()
|
||||||
not belongsToCommunity and self.controller.getMySectionId() != conf.CHAT_SECTION_ID):
|
if(belongsToCommunity and sectionId != chat.communityId or
|
||||||
|
not belongsToCommunity and sectionId != conf.CHAT_SECTION_ID):
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.doesChatExist(chat.id):
|
if self.doesChatExist(chat.id):
|
||||||
|
|
Loading…
Reference in New Issue