@ai-matrx/messaging 0.13.0 → 0.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog — `@ai-matrx/messaging`
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Fixed
6
+
7
+ - **Opening an unavailable conversation no longer loops.** 0.13.0 cleared a
8
+ conversation's read failure at the START of every `openConversation`, so a
9
+ second holder (the page and its thread pane both calling `useConversation`)
10
+ flipped `unavailable` back to false while its read was in flight. A host that
11
+ swaps the thread for an access surface on that flag remounted the thread,
12
+ which re-opened, which cleared it again — "Maximum update depth exceeded" on
13
+ matrx-frontend `/messages/<id>`. The failure is now replaced only by the next
14
+ answer.
15
+
16
+ ### Consumer action
17
+
18
+ - None — adopt the release.
19
+
3
20
  ## 0.13.0
4
21
 
5
22
  ### Added
package/dist/index.cjs CHANGED
@@ -1455,12 +1455,12 @@ function createMessagingEngine(options) {
1455
1455
  },
1456
1456
  async openConversation(id) {
1457
1457
  store.setActiveConversation(id);
1458
- store.setConversationReadFailure(id, null);
1459
1458
  try {
1460
1459
  const page = await repository.listMessages(id, { limit: messagePageSize });
1461
1460
  if (page.items.length === 0) {
1462
1461
  await repository.getConversation(id);
1463
1462
  }
1463
+ store.setConversationReadFailure(id, null);
1464
1464
  store.setThread(id, page.items, { hasMoreOlder: page.hasMore });
1465
1465
  } catch (error) {
1466
1466
  const normalized = normalizeMessagingError(error, "openConversation");