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/Chat+AsyncAwait.swift
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ public extension Chat {
137
137
/// - custom: Any custom properties or metadata associated with the user in the form of a `[String: JSONCodableScalar]`
138
138
/// - status: Tag that lets you categorize your app users by their current state. The tag choice is entirely up to you and depends on your use case
139
139
/// - type: Tag that lets you categorize your app users by their functional roles. The tag choice is entirely up to you and depends on your use case
140
-
/// - Returns: Updated user
140
+
/// - Returns: The updated ``User`` instance
141
141
func updateUser(
142
142
id:String,
143
143
name:String?=nil,
@@ -287,7 +287,7 @@ public extension Chat {
287
287
/// - description: Channel description
288
288
/// - status: Tag that lets you categorize your app users by their current state. The tag choice is entirely up to you and depends on your use case
289
289
/// - type: Tag that lets you categorize your app users by their functional roles. The tag choice is entirely up to you and depends on your use case
290
-
/// - Returns: A value containing an updated channel and its metadata
290
+
/// - Returns: A value containing an updated ``Channel`` and its metadata
291
291
func updateChannel(
292
292
id:String,
293
293
name:String?=nil,
@@ -378,10 +378,12 @@ public extension Chat {
378
378
379
379
/// Creates a public channel that let users engage in open conversations with many people. Unlike group chats, anyone can join public channels.
380
380
///
381
+
/// If you don't provide the name, the channel will get the same name as id (value of `channelId`)
382
+
///
381
383
/// - Parameters:
382
384
/// - channelId: ID of the public channel. The channel ID is created automatically using the UUID generator. You can override it by providing your own ID
383
385
/// - channelName: Display name for the channel
384
-
/// - channelDescription: If you don't provide the name, the channel will get the same name as id (value of `channelId`)
386
+
/// - channelDescription: Additional details about the channel
385
387
/// - channelCustom: Any custom properties or metadata associated with the channel in the form of a map of key-value pairs
386
388
/// - channelStatus: Current status of the channel, like online, offline, or archived
387
389
/// - Returns: A value containing details about created ``Channel``
Copy file name to clipboardExpand all lines: Sources/Chat.swift
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ public protocol Chat: AnyObject {
44
44
45
45
/// An object for manipulating the list of muted users.
46
46
///
47
-
/// The list is local to this instance of Chat (it is not persisted anywhere) unless ``ChatConfiguration/syncMutedUsers`` is enabled, in which case it will be synced
47
+
/// The list is local to this instance of ``Chat`` (it is not persisted anywhere) unless ``ChatConfiguration/syncMutedUsers`` is enabled, in which case it will be synced
48
48
/// using App Context for the current user.
49
49
///
50
50
/// Please note that this is not a server-side moderation mechanism, but rather a way to ignore messages from certain users on the client.
@@ -75,7 +75,7 @@ public protocol Chat: AnyObject {
75
75
/// - status: Tag that lets you categorize your app users by their current state. The tag choice is entirely up to you and depends on your use case
76
76
/// - type: Tag that lets you categorize your app users by their functional roles. The tag choice is entirely up to you and depends on your use case
77
77
/// - completion: The async `Result` of the method call
78
-
/// - **Success**: The user was successfully created and returns the created user
78
+
/// - **Success**: The ``User`` was successfully created and returns the created user
79
79
/// - **Failure**: An `Error` describing the failure
80
80
func createUser(
81
81
id:String,
@@ -94,7 +94,7 @@ public protocol Chat: AnyObject {
94
94
/// - Parameters:
95
95
/// - userId: Unique user identifier (up to 92 UTF-8 characters).
96
96
/// - completion: The async `Result` of the method call
97
-
/// - **Success**: The user was successfully returned
97
+
/// - **Success**: The ``User`` was successfully returned
98
98
/// - **Failure**: An `Error` describing the failure
99
99
func getUser(
100
100
userId:String,
@@ -190,7 +190,7 @@ public protocol Chat: AnyObject {
/// - completion: The async `Result` of the method call
193
-
/// - **Success**: A value containing a channel object with its metadata
193
+
/// - **Success**: A value containing a ``Channel`` object with its metadata
194
194
/// - **Failure**: An `Error` describing the failure
195
195
func getChannel(
196
196
channelId:String,
@@ -225,7 +225,7 @@ public protocol Chat: AnyObject {
225
225
/// - status: Tag that lets you categorize your app users by their current state. The tag choice is entirely up to you and depends on your use case
226
226
/// - type: Tag that lets you categorize your app users by their functional roles. The tag choice is entirely up to you and depends on your use case
227
227
/// - completion: The async `Result` of the method call
228
-
/// - **Success**: A value containing an updated channel and its metadata
228
+
/// - **Success**: A value containing an updated ``Channel`` and its metadata
229
229
/// - **Failure**: An `Error` describing the failure
230
230
func updateChannel(
231
231
id:String,
@@ -281,10 +281,12 @@ public protocol Chat: AnyObject {
281
281
282
282
/// Creates a public channel that let users engage in open conversations with many people. Unlike group chats, anyone can join public channels.
283
283
///
284
+
/// If you don't provide the name, the channel will get the same name as id (value of `channelId`)
285
+
///
284
286
/// - Parameters:
285
287
/// - channelId: ID of the public channel. The channel ID is created automatically using the UUID generator. You can override it by providing your own ID
286
288
/// - channelName: Display name for the channel
287
-
/// - channelDescription: If you don't provide the name, the channel will get the same name as id (value of `channelId`)
289
+
/// - channelDescription: Additional details about the channel
288
290
/// - channelCustom: Any custom properties or metadata associated with the channel in the form of a map of key-value pairs
289
291
/// - channelStatus: Current status of the channel, like online, offline, or archived
290
292
/// - completion: The async `Result` of the method call
@@ -360,7 +362,7 @@ public protocol Chat: AnyObject {
360
362
/// - channelId: Channel to listen for new events
361
363
/// - customMethod: An optional custom method for emitting events
362
364
/// - callback: A function that is called with an ``EventWrapper`` as its parameter. It defines the custom behavior to be executed whenever an event is detected on the specified channel
363
-
/// - Returns: ``AutoCloseable`` interface you can call to stop listening for new events and clean up resources when they re no longer needed by invoking the `close()` method
365
+
/// - Returns: ``AutoCloseable`` interface you can call to stop listening for new events and clean up resources when they re no longer needed by invoking the ``AutoCloseable/close()`` method
Copy file name to clipboardExpand all lines: Sources/Entities/Channel+AsyncAwait.swift
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ public extension Channel {
38
38
/// - description: Additional details about the channel
39
39
/// - status: Current status of the channel, like online, offline, or archived
40
40
/// - type: Represents the type of channel
41
-
/// - Returns: The updated channel object with its metadata
41
+
/// - Returns: The updated ``Channel`` object with its metadata
42
42
func update(
43
43
name:String?=nil,
44
44
custom:[String:JSONCodableScalar]?=nil,
@@ -103,7 +103,7 @@ public extension Channel {
103
103
/// Activates a typing indicator on a given channel.
104
104
///
105
105
/// The method sets a flag (typingSent) to indicate that a typing signal is in progress and adds a timer to reset
106
-
/// the flag after a specified timeout. You can change the default typing timeout and set your own value during the Chat SDK configuration (init() method)
106
+
/// the flag after a specified timeout. You can change the default typing timeout and set your own value during the Chat SDK configuration initialization
107
107
/// using the `typingTimeout` parameter
108
108
///
109
109
/// - Returns: A `Timetoken` indicating the action timestamp
@@ -277,7 +277,7 @@ public extension Channel {
277
277
///
278
278
/// - Parameters:
279
279
/// - users: List of users you want to invite to the ``Channel``. You can invite up to 100 users in one call
280
-
/// - completion: List of ``Membership`` of invited users
280
+
/// - Returns: List of ``Membership`` of invited users
/// - startTimetoken: The start timetoken for fetching the history of reported messages, which allows specifying the point in time where the history retrieval should begin
582
581
/// - endTimetoken: The end time token for fetching the history of reported messages, which allows specifying the point in time where the history retrieval should end
583
582
/// - count: The number of reported message events to fetch from the history
584
-
/// - completion: The async `Result` of the method call
585
-
/// - **Success**: A `Tuple` containing an array of `EventWrapper<EventContent>`, and a boolean indicating whether there are more messages available beyond the current result set
586
-
/// - **Failure**: An `Error` describing the failure
583
+
/// - Returns: A `Tuple` containing an array of `EventWrapper<EventContent>`, and a boolean indicating whether there are more messages available beyond the current result set
Copy file name to clipboardExpand all lines: Sources/Entities/Channel.swift
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public protocol Channel: CustomStringConvertible {
42
42
/// - Parameters:
43
43
/// - channels: Collection containing the channels to watch for updates
44
44
/// - callback: Defines the custom behavior to be executed when detecting channels changes
45
-
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its `close()` method
45
+
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
46
46
staticfunc streamUpdatesOn(
47
47
channels:[Self],
48
48
callback:@escaping(([Self])->Void)
@@ -57,7 +57,7 @@ public protocol Channel: CustomStringConvertible {
57
57
/// - status: Current status of the channel, like online, offline, or archived
58
58
/// - type: Represents the type of channel
59
59
/// - completion: The async `Result` of the method call
60
-
/// - **Success**: The updated channel object with its metadata
60
+
/// - **Success**: The updated ``Channel`` object with its metadata
61
61
/// - **Failure**: An `Error` describing the failure
62
62
func update(
63
63
name:String?,
@@ -95,7 +95,7 @@ public protocol Channel: CustomStringConvertible {
95
95
/// Activates a typing indicator on a given channel.
96
96
///
97
97
/// The method sets a flag (typingSent) to indicate that a typing signal is in progress and adds a timer to reset
98
-
/// the flag after a specified timeout. You can change the default typing timeout and set your own value during the Chat SDK configuration (init() method)
98
+
/// the flag after a specified timeout. You can change the default typing timeout and set your own value during the Chat SDK configuration initialization
99
99
/// using the `typingTimeout` parameter
100
100
///
101
101
/// - Parameters:
@@ -183,6 +183,7 @@ public protocol Channel: CustomStringConvertible {
183
183
/// - textLinks: Returned list of text links that are shown as text in the message
184
184
/// - quotedMessage: Object added to a message when you quote another message
185
185
/// - files: One or multiple files attached to the text message
186
+
/// - customPushData: Additional key-value pairs that will be added to the FCM and/or APNS push messages for the message itself and any user mentions
186
187
/// - completion: The async `Result` of the method callnel
187
188
/// - **Success**: The timetoken of the sent message
188
189
/// - **Failure**: An `Error` describing the failure
@@ -330,7 +331,7 @@ public protocol Channel: CustomStringConvertible {
330
331
/// - Parameters:
331
332
/// - timetoken: Timetoken of the message you want to retrieve from Message Persistence
332
333
/// - completion: The async `Result` of the method call
333
-
/// - **Success**: A message object (if any)
334
+
/// - **Success**: A ``Message`` object (if any)
334
335
/// - **Failure**: An `Error` describing the failure
335
336
func getMessage(
336
337
timetoken:Timetoken,
@@ -375,7 +376,7 @@ public protocol Channel: CustomStringConvertible {
375
376
///
376
377
/// - Parameters:
377
378
/// - completion: The async `Result` of the method call
378
-
/// - **Success**: A channel with updated `custom` field
379
+
/// - **Success**: A ``Channel`` with updated ``Channel/custom`` field
379
380
/// - **Failure**: An `Error` describing the failure
Copy file name to clipboardExpand all lines: Sources/Entities/Membership.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public protocol Membership: CustomStringConvertible {
42
42
/// - Parameters:
43
43
/// - memberships: Collection containing the ``Membership`` to watch for updates
44
44
/// - callback: Defines the custom behavior to be executed when detecting membership changes
45
-
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its `close()` method
45
+
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
46
46
staticfunc streamUpdatesOn(
47
47
memberships:[Self],
48
48
callback:@escaping(([Self])->Void)
@@ -100,7 +100,7 @@ public protocol Membership: CustomStringConvertible {
100
100
/// the stream will be canceled, and no further items will be produced. You can also stop receiving updates manually by calling ``AutoCloseable/close()``.
101
101
///
102
102
/// - Parameter callback: Defines the custom behavior to be executed when detecting membership changes
103
-
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its `close()` method
103
+
/// - Returns: An ``AutoCloseable`` that you can use to stop receiving objects events by invoking its ``AutoCloseable/close()`` method
tryawaitwithCheckedThrowingContinuation{ continuation in
211
211
removeThread{
@@ -241,8 +241,7 @@ public extension Message {
241
241
242
242
/// You can receive updates when this message and related message reactions are added, edited, or removed.
243
243
///
244
-
/// - Parameter completion: Function that takes a single Message object. It defines the custom behavior to be executed when detecting message or message reaction changes
245
-
/// - Returns: An asynchronous stream that produces updates when the current Message is edited or removed.
244
+
/// - Returns: An asynchronous stream that produces updates when the current ``Message`` is edited.
246
245
func streamUpdates()->AsyncStream<Self>{
247
246
AsyncStream{ continuation in
248
247
letautoCloseable=streamUpdates{
@@ -254,7 +253,7 @@ public extension Message {
254
253
}
255
254
}
256
255
257
-
/// If you delete a message, you can restore its content together with the attached files using the `restore()` method.
256
+
/// If you delete a message, you can restore its content together with the attached files using the ``restore()`` method.
258
257
///
259
258
/// This is possible, however, only if the message you want to restore was soft deleted (the soft parameter was set to true when deleting it). Hard deleted messages cannot be restored as their data
260
259
/// is no longer available in Message Persistence. This method also requires Message Persistence configuration. To manage messages, you must enable Message Persistence for your app's keyset
0 commit comments