parent
7b45ce60a7
commit
a5be90761b
|
@ -8,6 +8,7 @@ noBackup/
|
|||
*.log
|
||||
.update.timestamp
|
||||
.vscode
|
||||
.tours
|
||||
bin/
|
||||
/bottles/
|
||||
pkg/
|
||||
|
|
|
@ -130,18 +130,18 @@ proc init*(self: Controller) =
|
|||
proc getChat*(self: Controller): ChatDto =
|
||||
return self.chatService.getChatById(self.chatId)
|
||||
|
||||
proc getChatMember*(self: Controller, id: string): ChatMember =
|
||||
let chat = self.getChat()
|
||||
for member in chat.members:
|
||||
if (member.id == id):
|
||||
return member
|
||||
|
||||
proc getChatMembers*(self: Controller): seq[ChatMember] =
|
||||
var communityId = ""
|
||||
if (self.belongsToCommunity):
|
||||
communityId = self.sectionId
|
||||
return self.chatService.getMembers(communityId, self.chatId)
|
||||
|
||||
proc getChatMember*(self: Controller, id: string): ChatMember =
|
||||
let members = self.getChatMembers()
|
||||
for member in members:
|
||||
if (member.id == id):
|
||||
return member
|
||||
|
||||
proc getMembersPublicKeys*(self: Controller): seq[string] =
|
||||
if(self.belongsToCommunity):
|
||||
let communityDto = self.communityService.getCommunityById(self.sectionId)
|
||||
|
|
Loading…
Reference in New Issue