Skip to content

Commit a8f4c8b

Browse files
committed
Self review changes
1 parent 29d2fdb commit a8f4c8b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Sources/StreamChat/APIClient/ChatRemoteNotificationHandler.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ public class ChatRemoteNotificationHandler {
160160
guard let currentUser = client.currentUserController().currentUser else {
161161
return log.debug("No current user to mark messages as delivered")
162162
}
163-
/// Make sure if the message was already delivered, do not mark it as delivered.
164-
/// If the app is active, the middleware will mark it as delivered so the push
165-
/// does not need to do it.
163+
// Make sure if the message was already delivered, do not mark it as delivered.
164+
// If the app is active, the middleware will mark it as delivered so the push
165+
// does not need to do it.
166166
guard deliveryCriteriaValidator.canMarkMessageAsDelivered(message, for: currentUser, in: channel) else {
167167
log.debug("No message to be marked as delivered for messageId:\(message.id))")
168168
return

Sources/StreamChat/Models/ChannelRead.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public struct ChatChannelRead: Equatable {
99
/// The last time the user has read the channel.
1010
public let lastReadAt: Date
1111

12-
/// Id for the last message the user has read. Nil means the user has never read this channel
12+
/// Id for the last message the user has read. Nil means the user has never read this channel.
1313
public let lastReadMessageId: MessageId?
1414

1515
/// Number of unread messages the user has in this channel.
@@ -18,10 +18,10 @@ public struct ChatChannelRead: Equatable {
1818
/// The user who read the channel.
1919
public let user: ChatUser
2020

21-
/// The last time the user has delivered the channel.
21+
/// The last time a message has been delivered to this user.
2222
public let lastDeliveredAt: Date?
2323

24-
/// Id for the last message the user has delivered. Nil means the user has never delivered this channel
24+
/// The last message ID that has been delivered to this user.
2525
public let lastDeliveredMessageId: MessageId?
2626

2727
init(

Sources/StreamChat/Models/MessageDelivery/MessageDeliveryCriteriaValidator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protocol MessageDeliveryCriteriaValidating {
2323

2424
/// Default implementation of message delivery criteria validation.
2525
struct MessageDeliveryCriteriaValidator: MessageDeliveryCriteriaValidating {
26-
public init() {}
26+
init() {}
2727

2828
/// Determines if a message can be marked as delivered for a specific user in a channel.
2929
///
@@ -43,7 +43,7 @@ struct MessageDeliveryCriteriaValidator: MessageDeliveryCriteriaValidating {
4343
/// - currentUser: The current user who would mark the message as delivered.
4444
/// - channel: The channel containing the message.
4545
/// - Returns: `true` if the message can be marked as delivered, `false` otherwise.
46-
public func canMarkMessageAsDelivered(
46+
func canMarkMessageAsDelivered(
4747
_ message: ChatMessage,
4848
for currentUser: CurrentChatUser,
4949
in channel: ChatChannel

0 commit comments

Comments
 (0)