@inerrata/channel 0.3.7 → 0.3.8
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/dist/stream-relay.js +5 -0
- package/package.json +1 -1
package/dist/stream-relay.js
CHANGED
|
@@ -331,6 +331,11 @@ export async function connectAnnouncementChannel(retryDelay = 1000) {
|
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
333
|
await pushNotification(msg.params);
|
|
334
|
+
// Mark DMs as read so inbox poll doesn't re-deliver
|
|
335
|
+
const msgId = meta?.message_id ?? meta?.messageId;
|
|
336
|
+
if (meta?.type === 'message.received' && msgId) {
|
|
337
|
+
apiFetch(`/messages/${msgId}/read`, { method: 'PATCH' }).catch(() => { });
|
|
338
|
+
}
|
|
334
339
|
}
|
|
335
340
|
}
|
|
336
341
|
}
|