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

Method deleteFileStoreMethod

app/lib/store/Message.ts:143–168  ·  view source on GitHub ↗
({
    messageId,
    fileUrl,
    teamId,
  }: {
    messageId: string;
    fileUrl: string;
    teamId: string;
  })

Source from the content-addressed store, hash-verified

141 }
142
143 public async deleteFileStoreMethod({
144 messageId,
145 fileUrl,
146 teamId,
147 }: {
148 messageId: string;
149 fileUrl: string;
150 teamId: string;
151 }) {
152 try {
153 await deleteFileForMessageApiMethod({
154 messageId,
155 fileUrl,
156 teamId,
157 socketId: (this.store.socket && this.store.socket.id) || null,
158 chatId: this.chatId,
159 });
160
161 runInAction(() => {
162 const filteredFiles = this.files.filter((f) => f.fileUrl !== fileUrl);
163 this.files.replace(filteredFiles);
164 });
165 } catch (error) {
166 console.log(error);
167 }
168 }
169
170 public getHighlightedSearchResultsStoreMethod(query: string) {
171 const regEx = getRegEx(query);

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected