@poolse/react 2.23.0 → 2.25.0
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 +17 -0
- package/dist/index.cjs +48 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `@poolse/react` are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[semver](https://semver.org).
|
|
6
6
|
|
|
7
|
+
## [2.24.0] — 2026-10-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Group calls survive any hang-up path.** `hangUp` is the one
|
|
12
|
+
chokepoint every end-path shares — the in-call button, CallKit's
|
|
13
|
+
end event, the OS back gesture — and it now consults
|
|
14
|
+
`reportOthersOnCall`: with two or more others on the call, hanging
|
|
15
|
+
up leaves quietly; the end-the-call signal is reserved for the last
|
|
16
|
+
pair. The earlier guard lived only in CallScreen's button, so
|
|
17
|
+
CallKit's end event still tore down group calls for everyone.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `reportOthersOnCall(count)` — hosts (CallScreen does it
|
|
22
|
+
automatically) keep the hook's picture of the call current.
|
|
23
|
+
|
|
7
24
|
## [2.23.0] — 2026-10-14
|
|
8
25
|
|
|
9
26
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -1026,8 +1026,6 @@ function useUser(externalId) {
|
|
|
1026
1026
|
}, [chat, externalId]);
|
|
1027
1027
|
return state;
|
|
1028
1028
|
}
|
|
1029
|
-
|
|
1030
|
-
// src/grouping.ts
|
|
1031
1029
|
function computeGroupPosition(msg, prev, next, windowMs) {
|
|
1032
1030
|
const continuesPrev = sameGroup(msg, prev, windowMs);
|
|
1033
1031
|
const continuesNext = sameGroup(next, msg, windowMs);
|
|
@@ -1038,6 +1036,7 @@ function computeGroupPosition(msg, prev, next, windowMs) {
|
|
|
1038
1036
|
}
|
|
1039
1037
|
function sameGroup(a, b, windowMs) {
|
|
1040
1038
|
if (!a || !b) return false;
|
|
1039
|
+
if (sdk.isCallLogMessage(a) || sdk.isCallLogMessage(b)) return false;
|
|
1041
1040
|
if (a.sender_id !== b.sender_id) return false;
|
|
1042
1041
|
if (!sameDay(a.inserted_at, b.inserted_at)) return false;
|
|
1043
1042
|
const ta = new Date(a.inserted_at).getTime();
|
|
@@ -1547,7 +1546,21 @@ function useCalls(userId, opts = {}) {
|
|
|
1547
1546
|
}, ringTimeoutMs);
|
|
1548
1547
|
return () => clearTimeout(timer);
|
|
1549
1548
|
}, [phase, ringTimeoutMs]);
|
|
1549
|
+
const othersOnCallRef = react.useRef(0);
|
|
1550
|
+
const reportOthersOnCall = react.useCallback((count) => {
|
|
1551
|
+
othersOnCallRef.current = count;
|
|
1552
|
+
}, []);
|
|
1550
1553
|
const hangUp = react.useCallback(async () => {
|
|
1554
|
+
if (phaseRef.current === "active" && othersOnCallRef.current >= 2) {
|
|
1555
|
+
setPhase("idle");
|
|
1556
|
+
setIncoming(null);
|
|
1557
|
+
setOutgoing(null);
|
|
1558
|
+
setActiveConversationId(null);
|
|
1559
|
+
setActiveCallId(null);
|
|
1560
|
+
setActiveMedia(null);
|
|
1561
|
+
setError(null);
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1551
1564
|
const conversationId = activeConversationId ?? incoming?.conversationId ?? outgoing?.conversationId;
|
|
1552
1565
|
const callId = activeCallId ?? incoming?.callId ?? outgoing?.callId;
|
|
1553
1566
|
try {
|
|
@@ -1596,6 +1609,7 @@ function useCalls(userId, opts = {}) {
|
|
|
1596
1609
|
decline,
|
|
1597
1610
|
cancel,
|
|
1598
1611
|
hangUp,
|
|
1612
|
+
reportOthersOnCall,
|
|
1599
1613
|
reset
|
|
1600
1614
|
};
|
|
1601
1615
|
}
|
|
@@ -1620,6 +1634,38 @@ Object.defineProperty(exports, "RateLimitedError", {
|
|
|
1620
1634
|
enumerable: true,
|
|
1621
1635
|
get: function () { return sdk.RateLimitedError; }
|
|
1622
1636
|
});
|
|
1637
|
+
Object.defineProperty(exports, "callLogDisplayFor", {
|
|
1638
|
+
enumerable: true,
|
|
1639
|
+
get: function () { return sdk.callLogDisplayFor; }
|
|
1640
|
+
});
|
|
1641
|
+
Object.defineProperty(exports, "describeCallLog", {
|
|
1642
|
+
enumerable: true,
|
|
1643
|
+
get: function () { return sdk.describeCallLog; }
|
|
1644
|
+
});
|
|
1645
|
+
Object.defineProperty(exports, "formatCallDuration", {
|
|
1646
|
+
enumerable: true,
|
|
1647
|
+
get: function () { return sdk.formatCallDuration; }
|
|
1648
|
+
});
|
|
1649
|
+
Object.defineProperty(exports, "formatCallLogPreview", {
|
|
1650
|
+
enumerable: true,
|
|
1651
|
+
get: function () { return sdk.formatCallLogPreview; }
|
|
1652
|
+
});
|
|
1653
|
+
Object.defineProperty(exports, "isCallLogMessage", {
|
|
1654
|
+
enumerable: true,
|
|
1655
|
+
get: function () { return sdk.isCallLogMessage; }
|
|
1656
|
+
});
|
|
1657
|
+
Object.defineProperty(exports, "isMessageVisibleTo", {
|
|
1658
|
+
enumerable: true,
|
|
1659
|
+
get: function () { return sdk.isMessageVisibleTo; }
|
|
1660
|
+
});
|
|
1661
|
+
Object.defineProperty(exports, "parseCallLog", {
|
|
1662
|
+
enumerable: true,
|
|
1663
|
+
get: function () { return sdk.parseCallLog; }
|
|
1664
|
+
});
|
|
1665
|
+
Object.defineProperty(exports, "parseCallLogBody", {
|
|
1666
|
+
enumerable: true,
|
|
1667
|
+
get: function () { return sdk.parseCallLogBody; }
|
|
1668
|
+
});
|
|
1623
1669
|
exports.PoolseProvider = PoolseProvider;
|
|
1624
1670
|
exports.computeGroupPosition = computeGroupPosition;
|
|
1625
1671
|
exports.formatDayLabel = formatDayLabel;
|