(data, initialMessages)
| 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) { |
no outgoing calls
no test coverage detected