You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add TypingMember type, currentTypers property, and bump ably-cocoa to 1.2.58
- Bump ably-cocoa dependency from 1.2.51 to 1.2.58 for userClaim support
- Add TypingMember struct pairing clientID with userClaim metadata
- Add currentTypers property to Typing protocol and TypingSetEvent
- Add currentlyTypingMembers() to TypingTimerManager
- Consolidate createSandboxChatClient/createSandboxChatClientWithJWT into
a single helper with optional JWT parameters
- Add JWT auth helper (Sandbox.createJWT) for integration tests
- Add integration test for userClaim propagation across all event types
- Stub new ARTChannelProtocol methods from ably-cocoa 1.2.58 in mock
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Sources/AblyChat/Typing.swift
+39-2Lines changed: 39 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,24 @@
1
1
import Ably
2
2
3
+
/**
4
+
* Represents a user in the set of currently typing users, with associated metadata.
5
+
*/
6
+
publicstructTypingMember:Sendable{
7
+
/// The client ID of the typing user.
8
+
publicvarclientID:String
9
+
10
+
/// The user claim attached to this user's typing event, if any.
11
+
publicvaruserClaim:String?
12
+
13
+
/// Memberwise initializer to create a `TypingMember`.
14
+
///
15
+
/// - Note: You should not need to use this initializer when using the Chat SDK. It is exposed only to allow users to create mock versions of the SDK's protocols.
* Deprecated per CHA-T16; use ``currentTypers`` (CHA-T18) instead.
49
+
*
28
50
* - Returns: A set of clientIds that are currently typing.
29
51
*/
30
52
varcurrent:Set<String>{get}
31
53
54
+
// @spec CHA-T18
55
+
/**
56
+
* Gets the current set of users who are typing, with associated metadata.
57
+
*
58
+
* - Returns: An array of ``TypingMember`` for users currently typing.
59
+
*/
60
+
varcurrentTypers:[TypingMember]{get}
61
+
32
62
/**
33
63
* Keystroke indicates that the current user is typing. This will emit a ``TypingEvent`` event to inform listening clients and begin a timer,
34
64
* once the timer expires, another ``TypingEvent`` event will be emitted. In both cases ``TypingEvent/currentlyTyping``
@@ -95,6 +125,12 @@ public struct TypingSetEvent: Sendable {
95
125
*/
96
126
publicvarcurrentlyTyping:Set<String>
97
127
128
+
// @spec CHA-T6d
129
+
/**
130
+
* The set of users currently typing, with associated metadata.
131
+
*/
132
+
publicvarcurrentTypers:[TypingMember]
133
+
98
134
/**
99
135
* Get the details of the operation that modified the typing event.
100
136
*/
@@ -103,9 +139,10 @@ public struct TypingSetEvent: Sendable {
103
139
/// Memberwise initializer to create a `TypingSetEvent`.
104
140
///
105
141
/// - Note: You should not need to use this initializer when using the Chat SDK. It is exposed only to allow users to create mock versions of the SDK's protocols.
0 commit comments