@massalabs/gossip-sdk 0.0.2-dev.20260413064208 → 0.0.2-dev.20260413074528

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -132,9 +132,11 @@ export declare class MessageService {
132
132
  /** Fetch and decrypt messages from the protocol (alias) */
133
133
  fetch(): Promise<MessageResult>;
134
134
  /**
135
- * Delete an outgoing message by its database ID.
135
+ * Delete a message by its database ID (outgoing or incoming in 1-to-1).
136
136
  * Marks the local message as deleted and enqueues a delete control message
137
137
  * so the peer can mark their copy as deleted as well.
138
+ *
139
+ * Both sides can delete any message for plausible deniability.
138
140
  */
139
141
  deleteMessage(id: number): Promise<boolean>;
140
142
  sendReaction(contactUserId: string, emoji: string, originalMsgId: Uint8Array): Promise<SendMessageResult>;
@@ -1372,16 +1372,16 @@ export class MessageService {
1372
1372
  return this.fetchMessages();
1373
1373
  }
1374
1374
  /**
1375
- * Delete an outgoing message by its database ID.
1375
+ * Delete a message by its database ID (outgoing or incoming in 1-to-1).
1376
1376
  * Marks the local message as deleted and enqueues a delete control message
1377
1377
  * so the peer can mark their copy as deleted as well.
1378
+ *
1379
+ * Both sides can delete any message for plausible deniability.
1378
1380
  */
1379
1381
  async deleteMessage(id) {
1380
1382
  const row = await this.queries.messages.getById(id);
1381
1383
  if (!row)
1382
1384
  return false;
1383
- if (row.direction !== MessageDirection.OUTGOING)
1384
- return false;
1385
1385
  if (!row.messageId)
1386
1386
  throw new Error('Cannot delete a message that has no messageId');
1387
1387
  const original = rowToMessage(row);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massalabs/gossip-sdk",
3
- "version": "0.0.2-dev.20260413064208",
3
+ "version": "0.0.2-dev.20260413074528",
4
4
  "description": "Gossip SDK for automation, chatbot, and integration use cases",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",