From 4f706e8b2148424824abe792d7c24b15f6e66810 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 31 Jan 2022 14:11:09 -0500 Subject: [PATCH] hotfix(community): fix missing function --- src/app_service/service/community/service.nim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index 68e0c99ce4..ec9905d6bd 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -112,6 +112,20 @@ QtObject: self.joinedCommunities[membershipRequest.communityId] = community self.events.emit(SIGNAL_COMMUNITY_EDITED, CommunityArgs(community: community)) + proc mapChatToChatDto(chat: Chat, communityId: string): ChatDto = + result = ChatDto() + result.id = chat.id + result.communityId = communityId + result.name = chat.name + result.chatType = ChatType.CommunityChat + result.color = chat.color + result.emoji = chat.emoji + result.description = chat.description + result.canPost = chat.canPost + result.position = chat.position + result.categoryId = chat.categoryId + result.communityId = communityId + proc updateMissingFields(chatDto: var ChatDto, chat: Chat) = # This proc sets fields of `chatDto` which are available only for comminity channels. chatDto.position = chat.position