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

Method addDiscussionToLocalCacheStoreMethod

app/lib/store/User.ts:653–666  ·  view source on GitHub ↗
(data, initialComments)

Source from the content-addressed store, hash-verified

651 }
652
653 public addDiscussionToLocalCacheStoreMethod(data, initialComments): Discussion {
654 const obj = new Discussion({
655 ...data,
656 initialComments,
657 team: this.currentTeam,
658 store: this.store,
659 });
660
661 if (obj.discussionMemberIds.includes(this.store.currentUser._id)) {
662 this.activeDiscussionsForUser.push(obj);
663 }
664
665 return obj;
666 }
667
668 // update this.unreadCommentIds, this is implemented on server
669 public removeDiscussionFromLocalCacheStoreMethod(discussionId: string, whichList: string) {

Calls

no outgoing calls

Tested by

no test coverage detected