void FilelistApi::on(DirectoryListingManagerListener::ListingClosed, const DirectoryListingPtr& aList) noexcept { removeSubModule(aList->getUser()->getCID()); if (!subscriptionActive("filelist_removed")) { return; } send("filelist_removed", { { "id", aList->getUser()->getCID().toBase32() } }); }
void PrivateChatApi::on(MessageManagerListener::ChatRemoved, const PrivateChatPtr& aChat) noexcept { removeSubModule(aChat->getUser()->getCID()); if (!subscriptionActive("private_chat_removed")) { return; } send("private_chat_removed", { { "id", aChat->getUser()->getCID().toBase32() } }); }
void HubApi::on(ClientManagerListener::ClientRemoved, const ClientPtr& aClient) noexcept { addAsyncTask([=] { removeSubModule(aClient->getClientId()); if (!subscriptionActive("hub_removed")) { return; } send("hub_removed", { { "id", aClient->getClientId() } }); }); }