Skip to content

Commit

Permalink
Merge branch 'add-tests-and-caching' into delete-message-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
ttypic authored Jan 2, 2024
2 parents d685187 + 94ef340 commit c166a9f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ export class Conversation {

get members() {
return this.channel.presence;

async delete() {
await this.chatApi.deleteConversation(this.conversationId);
}
}
9 changes: 9 additions & 0 deletions src/Conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ export class Conversations {

return conversation;
}

async release(conversationId: string) {
const conversation = this.conversations[conversationId];
if (!conversation) {
return;
}
delete this.conversations[conversationId];
await conversation.delete();
}
}

0 comments on commit c166a9f

Please sign in to comment.