@fabriktor/fx 0.0.174 → 0.0.175

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.
@@ -199,7 +199,10 @@ export class ChatSendQueue {
199
199
  this.confirmed.has(entry.server_id))) {
200
200
  this.startConfirmation(entry, owner, signal);
201
201
  }
202
- if (entry.chat && entry.status === ChatSendStatus.Uploading) {
202
+ if (entry.chat && entry.status === ChatSendStatus.Queued) {
203
+ this.startUpload(entry, owner, signal);
204
+ }
205
+ else if (entry.chat && entry.status === ChatSendStatus.Uploading) {
203
206
  this.recoverUpload(entry, owner, signal);
204
207
  }
205
208
  }
@@ -477,7 +480,8 @@ export class ChatSendQueue {
477
480
  current = {
478
481
  ...current,
479
482
  chat,
480
- status: ChatSendStatus.UploadInterrupted,
483
+ // Confirmed message; its first attachment upload has not started.
484
+ status: ChatSendStatus.Queued,
481
485
  retry: undefined,
482
486
  };
483
487
  await this.save(current);
@@ -531,7 +535,8 @@ export class ChatSendQueue {
531
535
  return;
532
536
  }
533
537
  const stored = (await this.opts.store.list(owner)).find((value) => value.id === entry.id);
534
- if (!stored || !chatSendNeedsRetry(stored)) {
538
+ if (!stored?.chat ||
539
+ (stored.status !== ChatSendStatus.Queued && !chatSendNeedsRetry(stored))) {
535
540
  return;
536
541
  }
537
542
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabriktor/fx",
3
- "version": "0.0.174",
3
+ "version": "0.0.175",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {