mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
fix(@desktop/communities): remove chat_section data if user left the community
This commit is contained in:
parent
8d97203a85
commit
417f206d4d
@ -32,6 +32,9 @@ proc once*(this:EventEmitter, name:string, handler:Handler): void =
|
|||||||
handler(a)
|
handler(a)
|
||||||
this.events[name].del handlerId
|
this.events[name].del handlerId
|
||||||
|
|
||||||
|
proc onUsingUUID*(this: EventEmitter, handlerId: UUID, name: string, handler: Handler): void =
|
||||||
|
this.on(name, handlerId, handler)
|
||||||
|
|
||||||
proc onWithUUID*(this: EventEmitter, name: string, handler: Handler): UUID =
|
proc onWithUUID*(this: EventEmitter, name: string, handler: Handler): UUID =
|
||||||
var handlerId = genUUID()
|
var handlerId = genUUID()
|
||||||
this.on(name, handlerId, handler)
|
this.on(name, handlerId, handler)
|
||||||
@ -41,7 +44,6 @@ proc disconnect*(this: EventEmitter, handlerId: UUID) =
|
|||||||
for k, v in this.events:
|
for k, v in this.events:
|
||||||
if v.hasKey(handlerId):
|
if v.hasKey(handlerId):
|
||||||
this.events[k].del handlerId
|
this.events[k].del handlerId
|
||||||
return
|
|
||||||
|
|
||||||
proc emit*(this:EventEmitter, name:string, args:Args): void =
|
proc emit*(this:EventEmitter, name:string, args:Args): void =
|
||||||
if this.events.hasKey(name):
|
if this.events.hasKey(name):
|
||||||
|
23
src/app/core/unique_event_emitter.nim
Normal file
23
src/app/core/unique_event_emitter.nim
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import eventemitter
|
||||||
|
|
||||||
|
import # deps
|
||||||
|
uuids
|
||||||
|
|
||||||
|
type
|
||||||
|
UniqueUUIDEventEmitter* = ref object
|
||||||
|
events: EventEmitter
|
||||||
|
handlerId: UUID
|
||||||
|
|
||||||
|
proc initUniqueUUIDEventEmitter*(events: EventEmitter): UniqueUUIDEventEmitter =
|
||||||
|
result = UniqueUUIDEventEmitter()
|
||||||
|
result.events = events
|
||||||
|
result.handlerId = genUUID()
|
||||||
|
|
||||||
|
proc on*(self: UniqueUUIDEventEmitter, name: string, handler: Handler): void =
|
||||||
|
self.events.onUsingUUID(self.handlerId, name, handler)
|
||||||
|
|
||||||
|
proc disconnect*(self: UniqueUUIDEventEmitter) =
|
||||||
|
self.events.disconnect(self.handlerId)
|
||||||
|
|
||||||
|
proc eventsEmitter*(self: UniqueUUIDEventEmitter): EventEmitter =
|
||||||
|
return self.events
|
@ -14,13 +14,14 @@ import ../../../../../app_service/service/wallet_account/service as wallet_accou
|
|||||||
|
|
||||||
import ../../../../core/signals/types
|
import ../../../../core/signals/types
|
||||||
import ../../../../core/eventemitter
|
import ../../../../core/eventemitter
|
||||||
|
import ../../../../core/unique_event_emitter
|
||||||
import ../../../shared_models/message_item
|
import ../../../shared_models/message_item
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
Controller* = ref object of RootObj
|
Controller* = ref object of RootObj
|
||||||
delegate: io_interface.AccessInterface
|
delegate: io_interface.AccessInterface
|
||||||
events: EventEmitter
|
events: UniqueUUIDEventEmitter
|
||||||
sectionId: string
|
sectionId: string
|
||||||
chatId: string
|
chatId: string
|
||||||
belongsToCommunity: bool
|
belongsToCommunity: bool
|
||||||
@ -41,7 +42,7 @@ proc newController*(delegate: io_interface.AccessInterface, events: EventEmitter
|
|||||||
communityService: community_service.Service, messageService: message_service.Service): Controller =
|
communityService: community_service.Service, messageService: message_service.Service): Controller =
|
||||||
result = Controller()
|
result = Controller()
|
||||||
result.delegate = delegate
|
result.delegate = delegate
|
||||||
result.events = events
|
result.events = initUniqueUUIDEventEmitter(events)
|
||||||
result.sectionId = sectionId
|
result.sectionId = sectionId
|
||||||
result.chatId = chatId
|
result.chatId = chatId
|
||||||
result.belongsToCommunity = belongsToCommunity
|
result.belongsToCommunity = belongsToCommunity
|
||||||
@ -54,7 +55,7 @@ proc newController*(delegate: io_interface.AccessInterface, events: EventEmitter
|
|||||||
result.messageService = messageService
|
result.messageService = messageService
|
||||||
|
|
||||||
proc delete*(self: Controller) =
|
proc delete*(self: Controller) =
|
||||||
discard
|
self.events.disconnect()
|
||||||
|
|
||||||
proc init*(self: Controller) =
|
proc init*(self: Controller) =
|
||||||
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
||||||
|
@ -5,12 +5,13 @@ import ../../../../../../app_service/service/chat/service as chat_service
|
|||||||
import ../../../../../../app_service/service/gif/service as gif_service
|
import ../../../../../../app_service/service/gif/service as gif_service
|
||||||
import ../../../../../../app_service/service/gif/dto
|
import ../../../../../../app_service/service/gif/dto
|
||||||
import ../../../../../core/eventemitter
|
import ../../../../../core/eventemitter
|
||||||
|
import ../../../../../core/unique_event_emitter
|
||||||
|
|
||||||
type
|
type
|
||||||
Controller* = ref object of RootObj
|
Controller* = ref object of RootObj
|
||||||
delegate: io_interface.AccessInterface
|
delegate: io_interface.AccessInterface
|
||||||
sectionId: string
|
sectionId: string
|
||||||
events: EventEmitter
|
events: UniqueUUIDEventEmitter
|
||||||
chatId: string
|
chatId: string
|
||||||
belongsToCommunity: bool
|
belongsToCommunity: bool
|
||||||
communityService: community_service.Service
|
communityService: community_service.Service
|
||||||
@ -29,7 +30,7 @@ proc newController*(
|
|||||||
): Controller =
|
): Controller =
|
||||||
result = Controller()
|
result = Controller()
|
||||||
result.delegate = delegate
|
result.delegate = delegate
|
||||||
result.events = events
|
result.events = initUniqueUUIDEventEmitter(events)
|
||||||
result.sectionId = chatId
|
result.sectionId = chatId
|
||||||
result.chatId = chatId
|
result.chatId = chatId
|
||||||
result.belongsToCommunity = belongsToCommunity
|
result.belongsToCommunity = belongsToCommunity
|
||||||
@ -38,7 +39,7 @@ proc newController*(
|
|||||||
result.gifService = gifService
|
result.gifService = gifService
|
||||||
|
|
||||||
proc delete*(self: Controller) =
|
proc delete*(self: Controller) =
|
||||||
discard
|
self.events.disconnect()
|
||||||
|
|
||||||
proc init*(self: Controller) =
|
proc init*(self: Controller) =
|
||||||
self.events.on(SIGNAL_LOAD_RECENT_GIFS_DONE) do(e:Args):
|
self.events.on(SIGNAL_LOAD_RECENT_GIFS_DONE) do(e:Args):
|
||||||
|
@ -13,6 +13,7 @@ import ../../../../../../app_service/service/eth/utils as eth_utils
|
|||||||
import ../../../../../global/app_signals
|
import ../../../../../global/app_signals
|
||||||
import ../../../../../core/signals/types
|
import ../../../../../core/signals/types
|
||||||
import ../../../../../core/eventemitter
|
import ../../../../../core/eventemitter
|
||||||
|
import ../../../../../core/unique_event_emitter
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "messages-controller"
|
topics = "messages-controller"
|
||||||
@ -20,7 +21,7 @@ logScope:
|
|||||||
type
|
type
|
||||||
Controller* = ref object of RootObj
|
Controller* = ref object of RootObj
|
||||||
delegate: io_interface.AccessInterface
|
delegate: io_interface.AccessInterface
|
||||||
events: EventEmitter
|
events: UniqueUUIDEventEmitter
|
||||||
sectionId: string
|
sectionId: string
|
||||||
chatId: string
|
chatId: string
|
||||||
belongsToCommunity: bool
|
belongsToCommunity: bool
|
||||||
@ -38,7 +39,7 @@ proc newController*(delegate: io_interface.AccessInterface, events: EventEmitter
|
|||||||
Controller =
|
Controller =
|
||||||
result = Controller()
|
result = Controller()
|
||||||
result.delegate = delegate
|
result.delegate = delegate
|
||||||
result.events = events
|
result.events = initUniqueUUIDEventEmitter(events)
|
||||||
result.sectionId = sectionId
|
result.sectionId = sectionId
|
||||||
result.chatId = chatId
|
result.chatId = chatId
|
||||||
result.loadingMessagesPerPageFactor = 1
|
result.loadingMessagesPerPageFactor = 1
|
||||||
@ -50,7 +51,7 @@ proc newController*(delegate: io_interface.AccessInterface, events: EventEmitter
|
|||||||
result.mailserversService = mailserversService
|
result.mailserversService = mailserversService
|
||||||
|
|
||||||
proc delete*(self: Controller) =
|
proc delete*(self: Controller) =
|
||||||
discard
|
self.events.disconnect()
|
||||||
|
|
||||||
proc init*(self: Controller) =
|
proc init*(self: Controller) =
|
||||||
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args):
|
||||||
|
@ -51,9 +51,9 @@ proc createFetchMoreMessagesItem(self: Module): Item
|
|||||||
proc setChatDetails(self: Module, chatDetails: ChatDto)
|
proc setChatDetails(self: Module, chatDetails: ChatDto)
|
||||||
|
|
||||||
method delete*(self: Module) =
|
method delete*(self: Module) =
|
||||||
|
self.controller.delete
|
||||||
self.view.delete
|
self.view.delete
|
||||||
self.viewVariant.delete
|
self.viewVariant.delete
|
||||||
self.controller.delete
|
|
||||||
|
|
||||||
method load*(self: Module) =
|
method load*(self: Module) =
|
||||||
self.controller.init()
|
self.controller.init()
|
||||||
|
@ -62,12 +62,13 @@ proc newModule*(delegate: delegate_interface.AccessInterface, events: EventEmitt
|
|||||||
else: communityUsersModule
|
else: communityUsersModule
|
||||||
|
|
||||||
method delete*(self: Module) =
|
method delete*(self: Module) =
|
||||||
self.inputAreaModule.delete
|
self.controller.delete
|
||||||
self.messagesModule.delete
|
|
||||||
self.usersModule.delete
|
|
||||||
self.view.delete
|
self.view.delete
|
||||||
self.viewVariant.delete
|
self.viewVariant.delete
|
||||||
self.controller.delete
|
self.inputAreaModule.delete
|
||||||
|
self.messagesModule.delete
|
||||||
|
if self.usersModule != nil:
|
||||||
|
self.usersModule.delete
|
||||||
|
|
||||||
method load*(self: Module) =
|
method load*(self: Module) =
|
||||||
self.controller.init()
|
self.controller.init()
|
||||||
|
@ -7,11 +7,12 @@ import ../../../../../../app_service/service/message/service as message_service
|
|||||||
import ../../../../../../app_service/service/chat/service as chat_service
|
import ../../../../../../app_service/service/chat/service as chat_service
|
||||||
|
|
||||||
import ../../../../../core/eventemitter
|
import ../../../../../core/eventemitter
|
||||||
|
import ../../../../../core/unique_event_emitter
|
||||||
|
|
||||||
type
|
type
|
||||||
Controller* = ref object of RootObj
|
Controller* = ref object of RootObj
|
||||||
delegate: io_interface.AccessInterface
|
delegate: io_interface.AccessInterface
|
||||||
events: EventEmitter
|
events: UniqueUUIDEventEmitter
|
||||||
sectionId: string
|
sectionId: string
|
||||||
chatId: string
|
chatId: string
|
||||||
belongsToCommunity: bool
|
belongsToCommunity: bool
|
||||||
@ -32,7 +33,7 @@ proc newController*(
|
|||||||
): Controller =
|
): Controller =
|
||||||
result = Controller()
|
result = Controller()
|
||||||
result.delegate = delegate
|
result.delegate = delegate
|
||||||
result.events = events
|
result.events = initUniqueUUIDEventEmitter(events)
|
||||||
result.sectionId = sectionId
|
result.sectionId = sectionId
|
||||||
result.chatId = chatId
|
result.chatId = chatId
|
||||||
result.belongsToCommunity = belongsToCommunity
|
result.belongsToCommunity = belongsToCommunity
|
||||||
@ -44,7 +45,7 @@ proc newController*(
|
|||||||
result.chatService = chatService
|
result.chatService = chatService
|
||||||
|
|
||||||
proc delete*(self: Controller) =
|
proc delete*(self: Controller) =
|
||||||
discard
|
self.events.disconnect()
|
||||||
|
|
||||||
proc handleCommunityOnlyConnections(self: Controller) =
|
proc handleCommunityOnlyConnections(self: Controller) =
|
||||||
self.events.on(SIGNAL_COMMUNITY_MEMBER_APPROVED) do(e: Args):
|
self.events.on(SIGNAL_COMMUNITY_MEMBER_APPROVED) do(e: Args):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import NimQml, strutils, sequtils, sugar
|
import NimQml, strutils, sequtils, sugar, chronicles
|
||||||
import io_interface
|
import io_interface
|
||||||
import view, controller
|
import view, controller
|
||||||
import ../../../../shared_models/[member_model, member_item]
|
import ../../../../shared_models/[member_model, member_item]
|
||||||
@ -40,9 +40,9 @@ proc newModule*(
|
|||||||
result.moduleLoaded = false
|
result.moduleLoaded = false
|
||||||
|
|
||||||
method delete*(self: Module) =
|
method delete*(self: Module) =
|
||||||
|
self.controller.delete
|
||||||
self.view.delete
|
self.view.delete
|
||||||
self.viewVariant.delete
|
self.viewVariant.delete
|
||||||
self.controller.delete
|
|
||||||
|
|
||||||
method load*(self: Module) =
|
method load*(self: Module) =
|
||||||
if not self.moduleLoaded:
|
if not self.moduleLoaded:
|
||||||
|
@ -18,6 +18,7 @@ import ../../../../app_service/service/visual_identity/service as procs_from_vis
|
|||||||
import ../../../core/signals/types
|
import ../../../core/signals/types
|
||||||
import ../../../global/app_signals
|
import ../../../global/app_signals
|
||||||
import ../../../core/eventemitter
|
import ../../../core/eventemitter
|
||||||
|
import ../../../core/unique_event_emitter
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -27,7 +28,7 @@ type
|
|||||||
isCommunitySection: bool
|
isCommunitySection: bool
|
||||||
activeItemId: string
|
activeItemId: string
|
||||||
isCurrentSectionActive: bool
|
isCurrentSectionActive: bool
|
||||||
events: EventEmitter
|
events: UniqueUUIDEventEmitter
|
||||||
settingsService: settings_service.Service
|
settingsService: settings_service.Service
|
||||||
nodeConfigurationService: node_configuration_service.Service
|
nodeConfigurationService: node_configuration_service.Service
|
||||||
contactService: contact_service.Service
|
contactService: contact_service.Service
|
||||||
@ -53,7 +54,7 @@ proc newController*(delegate: io_interface.AccessInterface, sectionId: string, i
|
|||||||
result.sectionId = sectionId
|
result.sectionId = sectionId
|
||||||
result.isCommunitySection = isCommunity
|
result.isCommunitySection = isCommunity
|
||||||
result.isCurrentSectionActive = false
|
result.isCurrentSectionActive = false
|
||||||
result.events = events
|
result.events = initUniqueUUIDEventEmitter(events)
|
||||||
result.settingsService = settingsService
|
result.settingsService = settingsService
|
||||||
result.nodeConfigurationService = nodeConfigurationService
|
result.nodeConfigurationService = nodeConfigurationService
|
||||||
result.contactService = contactService
|
result.contactService = contactService
|
||||||
@ -67,7 +68,7 @@ proc newController*(delegate: io_interface.AccessInterface, sectionId: string, i
|
|||||||
result.communityTokensService = communityTokensService
|
result.communityTokensService = communityTokensService
|
||||||
|
|
||||||
proc delete*(self: Controller) =
|
proc delete*(self: Controller) =
|
||||||
discard
|
self.events.disconnect()
|
||||||
|
|
||||||
proc getActiveChatId*(self: Controller): string =
|
proc getActiveChatId*(self: Controller): string =
|
||||||
return self.activeItemId
|
return self.activeItemId
|
||||||
|
@ -13,6 +13,7 @@ import ../../../../app_service/service/token/service as token_service
|
|||||||
import model as chats_model
|
import model as chats_model
|
||||||
|
|
||||||
import ../../../core/eventemitter
|
import ../../../core/eventemitter
|
||||||
|
import ../../../core/unique_event_emitter
|
||||||
import ../../shared_models/token_list_item
|
import ../../shared_models/token_list_item
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ method doesTopLevelChatExist*(self: AccessInterface, chatId: string): bool {.bas
|
|||||||
method addChatIfDontExist*(self: AccessInterface,
|
method addChatIfDontExist*(self: AccessInterface,
|
||||||
chat: ChatDto,
|
chat: ChatDto,
|
||||||
belongsToCommunity: bool,
|
belongsToCommunity: bool,
|
||||||
events: EventEmitter,
|
events: UniqueUUIDEventEmitter,
|
||||||
settingsService: settings_service.Service,
|
settingsService: settings_service.Service,
|
||||||
nodeConfigurationService: node_configuration_service.Service,
|
nodeConfigurationService: node_configuration_service.Service,
|
||||||
contactService: contact_service.Service,
|
contactService: contact_service.Service,
|
||||||
|
@ -20,6 +20,7 @@ import chat_content/users/module as users_module
|
|||||||
import ../../../global/app_sections_config as conf
|
import ../../../global/app_sections_config as conf
|
||||||
import ../../../global/global_singleton
|
import ../../../global/global_singleton
|
||||||
import ../../../core/eventemitter
|
import ../../../core/eventemitter
|
||||||
|
import ../../../core/unique_event_emitter
|
||||||
import ../../../core/notifications/details as notification_details
|
import ../../../core/notifications/details as notification_details
|
||||||
import ../../../../app_service/common/types
|
import ../../../../app_service/common/types
|
||||||
import ../../../../app_service/service/settings/service as settings_service
|
import ../../../../app_service/service/settings/service as settings_service
|
||||||
@ -104,12 +105,12 @@ proc newModule*(
|
|||||||
contactService, chat_service, communityService, messageService)
|
contactService, chat_service, communityService, messageService)
|
||||||
|
|
||||||
method delete*(self: Module) =
|
method delete*(self: Module) =
|
||||||
|
self.controller.delete
|
||||||
|
self.view.delete
|
||||||
|
self.viewVariant.delete
|
||||||
for cModule in self.chatContentModules.values:
|
for cModule in self.chatContentModules.values:
|
||||||
cModule.delete
|
cModule.delete
|
||||||
self.chatContentModules.clear
|
self.chatContentModules.clear
|
||||||
self.view.delete
|
|
||||||
self.viewVariant.delete
|
|
||||||
self.controller.delete
|
|
||||||
if self.usersModule != nil:
|
if self.usersModule != nil:
|
||||||
self.usersModule.delete
|
self.usersModule.delete
|
||||||
|
|
||||||
@ -1108,7 +1109,7 @@ method setLoadingHistoryMessagesInProgress*(self: Module, isLoading: bool) =
|
|||||||
method addChatIfDontExist*(self: Module,
|
method addChatIfDontExist*(self: Module,
|
||||||
chat: ChatDto,
|
chat: ChatDto,
|
||||||
belongsToCommunity: bool,
|
belongsToCommunity: bool,
|
||||||
events: EventEmitter,
|
events: UniqueUUIDEventEmitter,
|
||||||
settingsService: settings_service.Service,
|
settingsService: settings_service.Service,
|
||||||
nodeConfigurationService: node_configuration_service.Service,
|
nodeConfigurationService: node_configuration_service.Service,
|
||||||
contactService: contact_service.Service,
|
contactService: contact_service.Service,
|
||||||
@ -1129,7 +1130,7 @@ method addChatIfDontExist*(self: Module,
|
|||||||
elif (chat.chatType != ChatType.OneToOne):
|
elif (chat.chatType != ChatType.OneToOne):
|
||||||
self.onChatRenamed(chat.id, chat.name)
|
self.onChatRenamed(chat.id, chat.name)
|
||||||
return
|
return
|
||||||
self.addNewChat(chat, belongsToCommunity, events, settingsService, nodeConfigurationService,
|
self.addNewChat(chat, belongsToCommunity, events.eventsEmitter(), settingsService, nodeConfigurationService,
|
||||||
contactService, chatService, communityService, messageService, gifService, mailserversService,
|
contactService, chatService, communityService, messageService, gifService, mailserversService,
|
||||||
setChatAsActive)
|
setChatAsActive)
|
||||||
|
|
||||||
|
@ -204,6 +204,7 @@ proc newModule*[T](
|
|||||||
result.networksModule = networks_module.newModule(result, events, networkService, walletAccountService, settingsService)
|
result.networksModule = networks_module.newModule(result, events, networkService, walletAccountService, settingsService)
|
||||||
|
|
||||||
method delete*[T](self: Module[T]) =
|
method delete*[T](self: Module[T]) =
|
||||||
|
self.controller.delete
|
||||||
self.profileSectionModule.delete
|
self.profileSectionModule.delete
|
||||||
self.stickersModule.delete
|
self.stickersModule.delete
|
||||||
self.activityCenterModule.delete
|
self.activityCenterModule.delete
|
||||||
@ -222,7 +223,6 @@ method delete*[T](self: Module[T]) =
|
|||||||
self.keycardSharedModuleKeycardSyncPurpose.delete
|
self.keycardSharedModuleKeycardSyncPurpose.delete
|
||||||
self.view.delete
|
self.view.delete
|
||||||
self.viewVariant.delete
|
self.viewVariant.delete
|
||||||
self.controller.delete
|
|
||||||
|
|
||||||
proc createTokenItem[T](self: Module[T], tokenDto: CommunityTokenDto, networks: seq[NetworkDto]) : TokenItem =
|
proc createTokenItem[T](self: Module[T], tokenDto: CommunityTokenDto, networks: seq[NetworkDto]) : TokenItem =
|
||||||
var chainName, chainIcon: string
|
var chainName, chainIcon: string
|
||||||
@ -846,6 +846,11 @@ method communityLeft*[T](self: Module[T], communityId: string) =
|
|||||||
let item = self.view.model().getItemById(singletonInstance.userProfile.getPubKey())
|
let item = self.view.model().getItemById(singletonInstance.userProfile.getPubKey())
|
||||||
self.setActiveSection(item)
|
self.setActiveSection(item)
|
||||||
|
|
||||||
|
var moduleToDelete: chat_section_module.AccessInterface
|
||||||
|
discard self.channelGroupModules.pop(communityId, moduleToDelete)
|
||||||
|
moduleToDelete.delete
|
||||||
|
moduleToDelete = nil
|
||||||
|
|
||||||
method communityEdited*[T](
|
method communityEdited*[T](
|
||||||
self: Module[T],
|
self: Module[T],
|
||||||
community: CommunityDto) =
|
community: CommunityDto) =
|
||||||
|
@ -882,11 +882,11 @@ QtObject:
|
|||||||
for chat in updatedCommunity.chats:
|
for chat in updatedCommunity.chats:
|
||||||
self.messageService.resetMessageCursor(chat.id)
|
self.messageService.resetMessageCursor(chat.id)
|
||||||
|
|
||||||
self.events.emit(SIGNAL_COMMUNITY_LEFT, CommunityIdArgs(communityId: communityId))
|
|
||||||
|
|
||||||
# remove related community requests
|
# remove related community requests
|
||||||
keepIf(self.myCommunityRequests, request => request.communityId != communityId)
|
keepIf(self.myCommunityRequests, request => request.communityId != communityId)
|
||||||
|
|
||||||
|
self.events.emit(SIGNAL_COMMUNITY_LEFT, CommunityIdArgs(communityId: communityId))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error "Error leaving community", msg = e.msg, communityId
|
error "Error leaving community", msg = e.msg, communityId
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user