MCPcopy Create free account
hub / github.com/async-labs/async / removeChatFromLocalCacheStoreMethod

Method removeChatFromLocalCacheStoreMethod

app/lib/store/User.ts:946–958  ·  view source on GitHub ↗
(chatId: string)

Source from the content-addressed store, hash-verified

944
945 // update this.unreadByUserMessageIds, this is implemented on server
946 public removeChatFromLocalCacheStoreMethod(chatId: string) {
947 const chat = this.chatsForUser.find((c) => c.chatId === chatId);
948 this.chatsForUser.remove(chat);
949 notify(`The chat was deleted.`);
950 Router.push(
951 `/chat?chatId=${(this.orderedChats[0] && this.orderedChats[0].chatId) || null}&teamId=${
952 chat.teamId
953 }`,
954 `/teams/${chat.teamId}/chats/${
955 (this.orderedChats[0] && this.orderedChats[0].chatId) || null
956 }`,
957 );
958 }
959
960 public async deleteChatStoreMethod({ chatId, teamId }: { chatId: string; teamId: string }) {
961 await deleteChatApiMethod({

Callers 3

deleteChatStoreMethodMethod · 0.95
ChatClass · 0.80

Calls 1

notifyFunction · 0.85

Tested by

no test coverage detected