fix: fix unable to write to invite only community channels

This was caused by the fact that the canPost property was not exposed from the ChatItem model.
I'm actually not sure why it didn't show an error trying to call  a function that doesn't exist
This commit is contained in:
Jonathan Rainville 2021-03-25 11:29:29 -04:00 committed by Iuri Matias
parent dc9de1968f
commit 147d93815f
1 changed files with 5 additions and 0 deletions

View File

@ -133,6 +133,11 @@ QtObject:
QtProperty[bool] hasMentions:
read = hasMentions
proc canPost*(self: ChatItemView): bool {.slot.} = result = ?.self.chatItem.canPost
QtProperty[bool] canPost:
read = canPost
proc isMember*(self: ChatItemView): bool {.slot.} =
if self.chatItem.isNil: return false
let pubKey = status_settings.getSetting[string](Setting.PublicKey, "0x0")