fix(community-chats): fix community chats getting duplicated

Fixes #4859 and #4858
This commit is contained in:
Jonathan Rainville 2022-02-22 11:50:48 -05:00 committed by Iuri Matias
parent 26477afb3b
commit f7860310db
1 changed files with 9 additions and 8 deletions

View File

@ -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):