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
Copy file name to clipboardExpand all lines: Sources/Entities/Channel.swift
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,16 @@ public protocol Channel: CustomStringConvertible {
34
34
/// Represents the type of the given ``Channel``
35
35
vartype:ChannelType?{get}
36
36
37
-
/// Receive updates when specific channels are added, edited or removed.
37
+
/// Receive updates when specific channels are updated or removed.
38
+
///
39
+
/// Emits the complete list of monitored channels whenever any one of them changes, excluding any that were removed.
38
40
///
39
41
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
40
42
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
41
43
///
42
44
/// - Parameters:
43
45
/// - channels: Collection containing the channels to watch for updates
44
-
/// - callback: Defines the custom behavior to be executed when detecting channels changes
46
+
/// - callback: A closure to be executed when detecting channel changes
45
47
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
46
48
staticfunc streamUpdatesOn(
47
49
channels:[Self],
@@ -387,7 +389,7 @@ public protocol Channel: CustomStringConvertible {
387
389
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
388
390
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
389
391
///
390
-
/// - Parameter callback: Function that takes a single Channel object. It defines the custom behavior to be executed when detecting channel changes
392
+
/// - Parameter callback: A closure to be executed when detecting channel changes. Takes a single Channel object or `nil` if the channel was removed
391
393
/// - Returns: ``AutoCloseable`` interface that lets you stop receiving channel-related updates (objects events) and clean up resources by invoking the `close()` method
Copy file name to clipboardExpand all lines: Sources/Entities/Membership.swift
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,16 @@ public protocol Membership: CustomStringConvertible {
34
34
/// Timetoken of the last message a user read on a given channel
35
35
varlastReadMessageTimetoken:Timetoken?{get}
36
36
37
-
/// Receive updates when specific memberships are added, edited or removed.
37
+
/// Receive updates when specific memberships are updated or removed.
38
+
///
39
+
/// Emits the complete list of monitored memberships whenever any one of them changes, excluding any that were removed.
38
40
///
39
41
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
40
42
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
41
43
///
42
44
/// - Parameters:
43
45
/// - memberships: Collection containing the ``Membership`` to watch for updates
44
-
/// - callback: Defines the custom behavior to be executed when detecting membership changes
46
+
/// - callback: A closure to be executed when detecting membership changes
45
47
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
46
48
staticfunc streamUpdatesOn(
47
49
memberships:[Self],
@@ -94,12 +96,12 @@ public protocol Membership: CustomStringConvertible {
94
96
completion:((Swift.Result<UInt64?,Error>)->Void)?
95
97
)
96
98
97
-
/// You can receive updates when specific user-channel Membership object(s) are added, edited, or removed.
99
+
/// You can receive updates when this user-channel Membership object is updated or removed.
98
100
///
99
101
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
100
102
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
101
103
///
102
-
/// - Parameter callback: Defines the custom behavior to be executed when detecting membership changes
104
+
/// - Parameter callback: A closure to be executed when detecting membership changes. Takes a Membership object or `nil` if the membership was removed
103
105
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
Copy file name to clipboardExpand all lines: Sources/Entities/Message.swift
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -61,14 +61,16 @@ public protocol Message: CustomStringConvertible {
61
61
/// Error associated with the message, if any
62
62
varerror:Error?{get}
63
63
64
-
/// Receive updates when specific messages and related message reactions are added, edited, or removed.
64
+
/// Receive updates when specific messages and related message reactions are updated or removed.
65
+
///
66
+
/// Emits the complete list of monitored messages whenever any one of them changes, excluding any that were removed.
65
67
///
66
68
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
67
69
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
68
70
///
69
71
/// - Parameters:
70
72
/// - messages: A collection of ``Message`` objects for which you want to get updates on changed messages
71
-
/// - callback: Function that takes a collection of ``Message`` objects. It defines the custom behavior to be executed when detecting message or message reaction changes
73
+
/// - callback: A closure to be executed when detecting message or message reaction changes
72
74
/// - Returns: Interface that lets you stop receiving message-related updates by invoking the `close()` method
Copy file name to clipboardExpand all lines: Sources/Entities/User.swift
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -42,14 +42,16 @@ public protocol User: CustomStringConvertible {
42
42
/// Indicates whether the user is currently (at the time of obtaining this ``User`` object) active
43
43
varactive:Bool{get}
44
44
45
-
/// Receive updates when specific users are added, edited or removed.
45
+
/// Receive updates when specific users are updated or removed.
46
+
///
47
+
/// Emits the complete list of monitored users whenever any one of them changes, excluding any that were removed.
46
48
///
47
49
/// - Important: Keep a strong reference to the returned ``AutoCloseable`` object as long as you want to receive updates. If ``AutoCloseable`` is deallocated,
48
50
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
49
51
///
50
52
/// - Parameters:
51
53
/// - users: Collection containing the users to watch for updates
52
-
/// - callback: Defines the custom behavior to be executed when detecting users changes
54
+
/// - callback: A closure to be executed when detecting user changes
53
55
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
54
56
staticfunc streamUpdatesOn(
55
57
users:[ChatType.ChatUserType],
@@ -156,7 +158,7 @@ public protocol User: CustomStringConvertible {
156
158
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
157
159
///
158
160
/// - Parameters:
159
-
/// - callback: A function that is triggered whenever the user's information are changed (added, edited, or removed)
161
+
/// - callback: A closure to be executed when detecting user changes. Takes a User object or `nil` if the user was removed
160
162
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
0 commit comments