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