parent
5ae5cd7efa
commit
ba500e5f73
|
@ -482,9 +482,11 @@ QtObject:
|
||||||
msgIndex = self.messageList[msg.chatId].messages.len - 1
|
msgIndex = self.messageList[msg.chatId].messages.len - 1
|
||||||
self.messagePushed(msgIndex)
|
self.messagePushed(msgIndex)
|
||||||
if self.channelOpenTime.getOrDefault(msg.chatId, high(int64)) < msg.timestamp.parseFloat.fromUnixFloat.toUnix:
|
if self.channelOpenTime.getOrDefault(msg.chatId, high(int64)) < msg.timestamp.parseFloat.fromUnixFloat.toUnix:
|
||||||
let channel = self.chats.getChannelById(msg.chatId)
|
var channel = self.chats.getChannelById(msg.chatId)
|
||||||
if (channel == nil):
|
if (channel == nil):
|
||||||
continue
|
channel = self.communities.getChannel(msg.chatId)
|
||||||
|
if (channel == nil):
|
||||||
|
continue
|
||||||
|
|
||||||
if msg.chatId == self.activeChannel.id:
|
if msg.chatId == self.activeChannel.id:
|
||||||
discard self.status.chat.markMessagesSeen(msg.chatId, @[msg.id])
|
discard self.status.chat.markMessagesSeen(msg.chatId, @[msg.id])
|
||||||
|
|
|
@ -341,3 +341,11 @@ QtObject:
|
||||||
error "Error declining request to join the community", msg = e.msg
|
error "Error declining request to join the community", msg = e.msg
|
||||||
return "Error declining request to join the community"
|
return "Error declining request to join the community"
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
proc getChannel*(self: CommunitiesView, channelId: string): Chat =
|
||||||
|
for community in self.joinedCommunityList.communities:
|
||||||
|
for chat in community.chats:
|
||||||
|
if (chat.id == channelId):
|
||||||
|
return chat
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue