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

Method addChatToLocalCacheStoreMethod

app/lib/store/User.ts:930–943  ·  view source on GitHub ↗
(data, initialMessages)

Source from the content-addressed store, hash-verified

928 }
929
930 public addChatToLocalCacheStoreMethod(data, initialMessages): Chat {
931 const obj = new Chat({
932 ...data,
933 initialMessages,
934 team: this.currentTeam,
935 store: this.store,
936 });
937
938 if (obj.chatParticipantIds.includes(this.store.currentUser._id)) {
939 this.chatsForUser.push(obj);
940 }
941
942 return obj;
943 }
944
945 // update this.unreadByUserMessageIds, this is implemented on server
946 public removeChatFromLocalCacheStoreMethod(chatId: string) {

Callers 3

ChatClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected