fix: fix crashes on join and permission removed
Fixes #14444 and #14447 The problem was that we accessed a categoryItem that might not have existed yet.
This commit is contained in:
parent
81f5349252
commit
75e1d3151f
|
@ -679,7 +679,7 @@ proc addNewChat(
|
|||
memberRole = community.memberRole
|
||||
|
||||
var categoryOpened = true
|
||||
if chatDto.categoryId != "":
|
||||
if chatDto.categoryId != "" and self.doesCatOrChatExist(chatDto.categoryId):
|
||||
let categoryItem = self.view.chatsModel.getItemById(chatDto.categoryId)
|
||||
categoryOpened = categoryItem.categoryOpened
|
||||
if channelGroup.id != "":
|
||||
|
|
Loading…
Reference in New Issue