Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CON-100] feat: delete message sdk #25

Merged
merged 8 commits into from
Jan 2, 2024

Conversation

ttypic
Copy link
Collaborator

@ttypic ttypic commented Dec 18, 2023

No description provided.

@ttypic ttypic requested a review from AndyTWF December 18, 2023 23:03
async deleteMessage(conversationId: string, messageId: string): Promise<void> {
const response = await fetch(`${this.baseUrl}/v1/conversations/${conversationId}/messages/${messageId}`, {
method: 'DELETE',
headers: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, conversations doesn't respect the client-id header - we get it from the token. But for now it'd be good to keep the header in :)

'ably-clientId': this.clientId,
},
});
if (!response.ok) throw new ErrorInfo(response.statusText, response.status, 4000);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual response code is 204 if we want to check that

@ttypic ttypic merged commit 4b41890 into add-tests-and-caching Jan 2, 2024
1 of 5 checks passed
@AndyTWF AndyTWF deleted the delete-message-sdk branch July 10, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants