@massalabs/gossip-sdk 0.0.2-dev.20260415060346 → 0.0.2-dev.20260416094547

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.
@@ -117,6 +117,21 @@ export class RefreshService {
117
117
  contactUserId: discussion.contactUserId,
118
118
  status,
119
119
  });
120
+ // When a session we initiated finally gets accepted (SelfRequested → Active),
121
+ // proactively flush any messages the user queued during the waiting-approval
122
+ // phase instead of waiting for the next periodic stateUpdate tick.
123
+ if (previous === SessionStatus.SelfRequested &&
124
+ status === SessionStatus.Active) {
125
+ const flushResult = await this.messageService.processSendQueueForContact(discussion.contactUserId);
126
+ if (!flushResult.success) {
127
+ logger
128
+ .forMethod('refreshSessionsStatusEvent')
129
+ .error('failed to flush send queue on SelfRequested→Active', {
130
+ contactUserId: discussion.contactUserId,
131
+ error: flushResult.error,
132
+ });
133
+ }
134
+ }
120
135
  }
121
136
  }
122
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massalabs/gossip-sdk",
3
- "version": "0.0.2-dev.20260415060346",
3
+ "version": "0.0.2-dev.20260416094547",
4
4
  "description": "Gossip SDK for automation, chatbot, and integration use cases",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",