()
| 76 | } |
| 77 | |
| 78 | async removeFromServer() { |
| 79 | if (!this.session?.conversationId) |
| 80 | return; |
| 81 | const response = await fetch(`${this.credential.url}/${this.session.conversationId}`, { |
| 82 | body: JSON.stringify({is_visible: false}), |
| 83 | method: 'PATCH', |
| 84 | headers: this.#getHeaders(), |
| 85 | }); |
| 86 | await response.json(); |
| 87 | } |
| 88 | |
| 89 | async removeMessagesAfter(index: number) { |
| 90 | // The index of messageIds starts from 1. |
no test coverage detected