From 12a3ca366adfe25e333633b949853f3cabe526c6 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 23 Aug 2023 13:27:48 -0400 Subject: [PATCH] add logs to debug --- src/app/modules/main/activity_center/controller.nim | 1 + src/app/modules/main/app_search/controller.nim | 1 + src/app/modules/main/chat_section/chat_content/controller.nim | 1 + .../main/chat_section/chat_content/messages/controller.nim | 1 + src/app/modules/main/chat_section/controller.nim | 1 + src/app/modules/main/communities/controller.nim | 1 + src/app/modules/main/communities/tokens/controller.nim | 1 + src/app/modules/main/controller.nim | 1 + src/app_service/service/community/service.nim | 2 ++ 9 files changed, 10 insertions(+) diff --git a/src/app/modules/main/activity_center/controller.nim b/src/app/modules/main/activity_center/controller.nim index a058c9d903..8fc2446456 100644 --- a/src/app/modules/main/activity_center/controller.nim +++ b/src/app/modules/main/activity_center/controller.nim @@ -99,6 +99,7 @@ proc getContactDetails*(self: Controller, contactId: string): ContactDetails = return self.contactsService.getContactDetails(contactId) proc getCommunityById*(self: Controller, communityId: string): CommunityDto = + echo "getCommunityById from activity_center module" return self.communityService.getCommunityById(communityId) proc getActivityCenterNotifications*(self: Controller): seq[ActivityCenterNotificationDto] = diff --git a/src/app/modules/main/app_search/controller.nim b/src/app/modules/main/app_search/controller.nim index 45103ab724..4198f1f7ab 100644 --- a/src/app/modules/main/app_search/controller.nim +++ b/src/app/modules/main/app_search/controller.nim @@ -89,6 +89,7 @@ proc getChannelGroups*(self: Controller): seq[ChannelGroupDto] = return self.chatService.getChannelGroups() proc getCommunityById*(self: Controller, communityId: string): CommunityDto = + echo "getCommunityById from app_search module" return self.communityService.getCommunityById(communityId) proc getChatDetailsForChatTypes*(self: Controller, types: seq[ChatType]): seq[ChatDto] = diff --git a/src/app/modules/main/chat_section/chat_content/controller.nim b/src/app/modules/main/chat_section/chat_content/controller.nim index ff43ae5b1c..3391ef3034 100644 --- a/src/app/modules/main/chat_section/chat_content/controller.nim +++ b/src/app/modules/main/chat_section/chat_content/controller.nim @@ -188,6 +188,7 @@ proc getChatDetails*(self: Controller): ChatDto = return self.chatService.getChatById(self.chatId) proc getCommunityDetails*(self: Controller): CommunityDto = + echo "getCommunityById from chat_content module" return self.communityService.getCommunityById(self.sectionId) proc getOneToOneChatNameAndImage*(self: Controller): tuple[name: string, image: string, largeImage: string] = diff --git a/src/app/modules/main/chat_section/chat_content/messages/controller.nim b/src/app/modules/main/chat_section/chat_content/messages/controller.nim index 5031e45128..e96b773847 100644 --- a/src/app/modules/main/chat_section/chat_content/messages/controller.nim +++ b/src/app/modules/main/chat_section/chat_content/messages/controller.nim @@ -240,6 +240,7 @@ proc getChatDetails*(self: Controller): ChatDto = return self.chatService.getChatById(self.chatId) proc getCommunityDetails*(self: Controller): CommunityDto = + echo "getCommunityById from messages module" return self.communityService.getCommunityById(self.sectionId) proc getOneToOneChatNameAndImage*(self: Controller): diff --git a/src/app/modules/main/chat_section/controller.nim b/src/app/modules/main/chat_section/controller.nim index d4f2227ddc..87446be3f3 100644 --- a/src/app/modules/main/chat_section/controller.nim +++ b/src/app/modules/main/chat_section/controller.nim @@ -381,6 +381,7 @@ proc isCommunity*(self: Controller): bool = return self.isCommunitySection proc getMyCommunity*(self: Controller): CommunityDto = + echo "getCommunityById from chat_section module" return self.communityService.getCommunityById(self.sectionId) proc getCategories*(self: Controller, communityId: string): seq[Category] = diff --git a/src/app/modules/main/communities/controller.nim b/src/app/modules/main/communities/controller.nim index 242ef193ba..a89f58c3b3 100644 --- a/src/app/modules/main/communities/controller.nim +++ b/src/app/modules/main/communities/controller.nim @@ -205,6 +205,7 @@ proc getAllCommunities*(self: Controller): seq[CommunityDto] = result = self.communityService.getAllCommunities() proc getCommunityById*(self: Controller, communityId: string): CommunityDto = + echo "getCommunityById from communities module" result = self.communityService.getCommunityById(communityId) proc getCuratedCommunities*(self: Controller): seq[CommunityDto] = diff --git a/src/app/modules/main/communities/tokens/controller.nim b/src/app/modules/main/communities/tokens/controller.nim index e5c36af7c2..f7f1bb741a 100644 --- a/src/app/modules/main/communities/tokens/controller.nim +++ b/src/app/modules/main/communities/tokens/controller.nim @@ -138,4 +138,5 @@ proc getTokenMasterToken*(self: Controller, communityId: string): CommunityToken return self.communityTokensService.getTokenMasterToken(communityId) proc getCommunityById*(self: Controller, communityId: string): CommunityDto = + echo "getCommunityById from tokens module" return self.communityService.getCommunityById(communityId) \ No newline at end of file diff --git a/src/app/modules/main/controller.nim b/src/app/modules/main/controller.nim index 1fca029ea8..d18eca1c7b 100644 --- a/src/app/modules/main/controller.nim +++ b/src/app/modules/main/controller.nim @@ -501,6 +501,7 @@ proc switchTo*(self: Controller, sectionId, chatId, messageId: string) = self.events.emit(SIGNAL_MAKE_SECTION_CHAT_ACTIVE, data) proc getCommunityById*(self: Controller, communityId: string): CommunityDto = + echo "getCommunityById from main module" return self.communityService.getCommunityById(communityId) proc getStatusForContactWithId*(self: Controller, publicKey: string): StatusUpdateDto = diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index e7aadf1442..3fc9544c14 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -727,6 +727,7 @@ QtObject: return toSeq(self.communities.keys) proc getCommunityTokenBySymbol*(self: Service, communityId: string, symbol: string): CommunityTokenDto = + echo "getCommunityById from getCommunityTokenBySymbol" let community = self.getCommunityById(communityId) for metadata in community.communityTokensMetadata: if metadata.symbol == symbol: @@ -2002,6 +2003,7 @@ QtObject: return community.declinedRequestsToJoin[indexDeclined].publicKey proc checkChatHasPermissions*(self: Service, communityId: string, chatId: string): bool = + echo "getCommunityById from checkChatHasPermissions" let community = self.getCommunityById(communityId) for id, tokenPermission in community.tokenPermissions: if TokenPermissionType(tokenPermission.`type`) == TokenPermissionType.View or TokenPermissionType(tokenPermission.`type`) == TokenPermissionType.ViewAndPost: