@massalabs/gossip-sdk 0.0.2-dev.20260411031813 → 0.0.2-dev.20260413064208
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.
|
@@ -21,6 +21,7 @@ export declare enum SdkEventType {
|
|
|
21
21
|
MESSAGE_EDITED_OPTIMISTIC = "messageEditedOptimistic",
|
|
22
22
|
MESSAGE_DELETE_FAILED = "messageDeleteFailed",
|
|
23
23
|
MESSAGE_EDIT_FAILED = "messageEditFailed",
|
|
24
|
+
MESSAGE_ACKNOWLEDGED = "messageAcknowledged",
|
|
24
25
|
ERROR = "error"
|
|
25
26
|
}
|
|
26
27
|
export type SdkEvents = {
|
|
@@ -73,6 +74,10 @@ export type SdkEvents = {
|
|
|
73
74
|
messageDbId: number;
|
|
74
75
|
original: Message;
|
|
75
76
|
};
|
|
77
|
+
[SdkEventType.MESSAGE_ACKNOWLEDGED]: {
|
|
78
|
+
contactUserId: string;
|
|
79
|
+
messageDbId: number;
|
|
80
|
+
};
|
|
76
81
|
[SdkEventType.ERROR]: {
|
|
77
82
|
error: Error;
|
|
78
83
|
context: string;
|
|
@@ -21,6 +21,7 @@ export var SdkEventType;
|
|
|
21
21
|
SdkEventType["MESSAGE_EDITED_OPTIMISTIC"] = "messageEditedOptimistic";
|
|
22
22
|
SdkEventType["MESSAGE_DELETE_FAILED"] = "messageDeleteFailed";
|
|
23
23
|
SdkEventType["MESSAGE_EDIT_FAILED"] = "messageEditFailed";
|
|
24
|
+
SdkEventType["MESSAGE_ACKNOWLEDGED"] = "messageAcknowledged";
|
|
24
25
|
SdkEventType["ERROR"] = "error";
|
|
25
26
|
})(SdkEventType || (SdkEventType = {}));
|
|
26
27
|
export class SdkEventEmitter {
|
package/dist/services/message.js
CHANGED
|
@@ -627,6 +627,10 @@ export class MessageService {
|
|
|
627
627
|
seeker: null,
|
|
628
628
|
whenToSend: null,
|
|
629
629
|
});
|
|
630
|
+
this.eventEmitter.emit(SdkEventType.MESSAGE_ACKNOWLEDGED, {
|
|
631
|
+
contactUserId: m.contactUserId,
|
|
632
|
+
messageDbId: m.id,
|
|
633
|
+
});
|
|
630
634
|
}
|
|
631
635
|
// After marking as DELIVERED, clean up DELIVERED keep-alive messages
|
|
632
636
|
await this.queries.messages.deleteDeliveredKeepAlive(userId);
|
package/package.json
CHANGED