wtt-connect 0.2.47 → 0.2.48
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.
- package/package.json +1 -1
- package/src/wtt-client.js +16 -2
package/package.json
CHANGED
package/src/wtt-client.js
CHANGED
|
@@ -197,14 +197,28 @@ export class WTTClient {
|
|
|
197
197
|
};
|
|
198
198
|
if (this.config.token) {
|
|
199
199
|
try {
|
|
200
|
-
await this.httpTyping(payload, options.timeoutMs || 5000);
|
|
200
|
+
const result = await this.httpTyping(payload, options.timeoutMs || 5000);
|
|
201
|
+
log('info', 'typing status sent via HTTP', {
|
|
202
|
+
topicId,
|
|
203
|
+
state,
|
|
204
|
+
kind: payload.status_kind || '',
|
|
205
|
+
broadcast: result?.broadcast ?? '',
|
|
206
|
+
text: payload.status_text ? String(payload.status_text).slice(0, 80) : '',
|
|
207
|
+
});
|
|
201
208
|
return;
|
|
202
209
|
} catch (err) {
|
|
203
210
|
log('warn', 'HTTP typing fallback failed; trying websocket action', { topicId, state, error: err?.message || err });
|
|
204
211
|
}
|
|
205
212
|
}
|
|
206
213
|
try {
|
|
207
|
-
await this.action('typing', payload, 5000);
|
|
214
|
+
const result = await this.action('typing', payload, 5000);
|
|
215
|
+
log('info', 'typing status sent via websocket', {
|
|
216
|
+
topicId,
|
|
217
|
+
state,
|
|
218
|
+
kind: payload.status_kind || '',
|
|
219
|
+
broadcast: result?.broadcast ?? '',
|
|
220
|
+
text: payload.status_text ? String(payload.status_text).slice(0, 80) : '',
|
|
221
|
+
});
|
|
208
222
|
} catch (err) {
|
|
209
223
|
log('warn', 'typing status dropped', { topicId, state, error: err?.message || err });
|
|
210
224
|
}
|