diff --git a/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/Mother.kt b/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/Mother.kt index 3d443f17196..59a4cfec738 100644 --- a/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/Mother.kt +++ b/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/Mother.kt @@ -67,6 +67,7 @@ public fun randomChannelVisibleEvent( channelType: String = randomString(), channelId: String = randomString(), user: User = randomUser(), + ): ChannelVisibleEvent = ChannelVisibleEvent( type = EventType.CHANNEL_VISIBLE, createdAt = createdAt, @@ -75,6 +76,7 @@ public fun randomChannelVisibleEvent( channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = randomDate(), ) public fun randomUserStartWatchingEvent( @@ -93,6 +95,7 @@ public fun randomUserStartWatchingEvent( channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = randomDate(), ) public fun randomChannelDeletedEvent( @@ -113,6 +116,7 @@ public fun randomChannelDeletedEvent( channelType = channelType, channelId = channelId, channel = channel, + channelLastMessageAt = randomDate(), ) } @@ -136,6 +140,7 @@ public fun randomNotificationChannelDeletedEvent( channel = channel, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = randomDate(), ) } @@ -159,6 +164,7 @@ public fun randomReactionNewEvent( channelId = channelId, message = message, reaction = reaction, + channelLastMessageAt = randomDate(), ) } @@ -178,6 +184,7 @@ public fun randomMessageReadEvent( cid = cid, channelType = channelType, channelId = channelId, + channelLastMessageAt = randomDate(), ) } @@ -201,6 +208,7 @@ public fun randomNotificationMarkReadEvent( channelId = channelId, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = randomDate(), ) } @@ -222,6 +230,7 @@ public fun randomTypingStopEvent( channelType = channelType, channelId = channelId, parentId = parentId, + channelLastMessageAt = randomDate(), ) } @@ -243,6 +252,7 @@ public fun randomTypingStartEvent( channelType = channelType, channelId = channelId, parentId = parentId, + channelLastMessageAt = randomDate(), ) } @@ -264,6 +274,7 @@ public fun randomMemberAddedEvent( channelType = channelType, channelId = channelId, member = member, + channelLastMessageAt = randomDate(), ) } @@ -289,6 +300,7 @@ public fun randomNotificationAddedToChannelEvent( member = member, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = randomDate(), ) } @@ -314,6 +326,7 @@ public fun randomNotificationMessageNewEvent( message = message, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = randomDate(), ) } @@ -334,6 +347,7 @@ public fun randomMessageUpdateEvent( channelType = channelType, channelId = channelId, message = message, + channelLastMessageAt = randomDate(), ) public fun randomChannelUpdatedEvent( @@ -353,6 +367,7 @@ public fun randomChannelUpdatedEvent( channelId = channelId, message = message, channel = channel, + channelLastMessageAt = randomDate(), ) } @@ -375,6 +390,7 @@ public fun randomChannelUpdatedByUserEvent( message = message, channel = channel, user = user, + channelLastMessageAt = randomDate(), ) } @@ -401,6 +417,7 @@ public fun randomNewMessageEvent( watcherCount = watcherCount, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = randomDate(), ) } @@ -428,6 +445,7 @@ public fun randomNotificationAddedToChannelEvent( member = member, totalUnreadCount = randomInt(), unreadChannels = randomInt(), + channelLastMessageAt = randomDate(), ) } @@ -448,6 +466,7 @@ public fun randomNotificationRemovedFromChannelEvent( channelId = randomString(), channel = channel, member = member, + channelLastMessageAt = randomDate(), ) } @@ -468,6 +487,7 @@ public fun randomNotificationMessageNewEvent( message = randomMessage(), totalUnreadCount = randomInt(), unreadChannels = randomInt(), + channelLastMessageAt = randomDate(), ) } @@ -483,6 +503,7 @@ public fun randomMemberAddedEvent(cid: String = randomString()): MemberAddedEven channelType = randomString(), channelId = randomString(), member = randomMember(), + channelLastMessageAt = randomDate(), ) } @@ -498,6 +519,7 @@ public fun randomMemberRemovedEvent(cid: String = randomString(), member: Member channelType = randomString(), channelId = randomString(), member = member, + channelLastMessageAt = randomDate(), ) } @@ -519,5 +541,6 @@ public fun randomChannelUserBannedEvent( channelId = id, expiration = banExpires, shadow = shadow, + channelLastMessageAt = randomDate(), ) } diff --git a/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/utils/TestDataHelper.kt b/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/utils/TestDataHelper.kt index 7eb1a3291bd..ef3abc4695b 100644 --- a/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/utils/TestDataHelper.kt +++ b/stream-chat-android-client-test/src/main/java/io/getstream/chat/android/client/test/utils/TestDataHelper.kt @@ -28,7 +28,6 @@ import io.getstream.chat.android.client.events.ConnectedEvent import io.getstream.chat.android.client.events.DisconnectedEvent import io.getstream.chat.android.client.events.MemberAddedEvent import io.getstream.chat.android.client.events.MemberRemovedEvent -import io.getstream.chat.android.client.events.MessageDeletedEvent import io.getstream.chat.android.client.events.MessageReadEvent import io.getstream.chat.android.client.events.MessageUpdatedEvent import io.getstream.chat.android.client.events.NewMessageEvent @@ -57,11 +56,13 @@ import io.getstream.chat.android.models.Mute import io.getstream.chat.android.models.Reaction import io.getstream.chat.android.models.User import io.getstream.chat.android.models.querysort.QuerySortByField +import io.getstream.chat.android.randomDate import io.getstream.chat.android.randomString import io.getstream.result.Result import java.util.Calendar import java.util.Date import java.util.UUID +import io.getstream.chat.android.client.events.MessageDeletedEvent as MessageDeletedEvent1 @Suppress("LargeClass") public class TestDataHelper { @@ -285,17 +286,18 @@ public class TestDataHelper { val createdAt = Date() NewMessageEvent( - EventType.MESSAGE_NEW, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - message1, - 1, - 0, - 0, + type = EventType.MESSAGE_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = message1, + watcherCount = 1, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } @@ -303,34 +305,36 @@ public class TestDataHelper { val createdAt = Date() NewMessageEvent( - EventType.MESSAGE_NEW, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - message2Older, - 1, - 0, - 0, + type = EventType.MESSAGE_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = message2Older, + watcherCount = 1, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } public val newMessageFromUser2: NewMessageEvent by lazy { val createdAt = Date() NewMessageEvent( - EventType.MESSAGE_NEW, - createdAt, - streamFormatter.format(createdAt), - user2, - channel1.cid, - channel1.type, - channel1.id, - messageFromUser2, - 1, - 0, - 0, + type = EventType.MESSAGE_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user2, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = messageFromUser2, + watcherCount = 1, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } @@ -338,16 +342,17 @@ public class TestDataHelper { val createdAt = Date() NotificationMessageNewEvent( - EventType.NOTIFICATION_MESSAGE_NEW, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - channel1.type, - channel1.id, - channel1, - message1WithoutChannelAndCid, - 0, - 0, + type = EventType.NOTIFICATION_MESSAGE_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + message = message1WithoutChannelAndCid, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } @@ -355,21 +360,22 @@ public class TestDataHelper { val createdAt = Date() MessageUpdatedEvent( - EventType.MESSAGE_UPDATED, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - message1Updated, + type = EventType.MESSAGE_UPDATED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = message1Updated, + channelLastMessageAt = randomDate(), ) } - public val messageDeletedEvent: MessageDeletedEvent by lazy { + public val messageDeletedEvent: MessageDeletedEvent1 by lazy { val createdAt = Date() - MessageDeletedEvent( + MessageDeletedEvent1( type = EventType.MESSAGE_DELETED, createdAt = createdAt, rawCreatedAt = streamFormatter.format(createdAt), @@ -379,13 +385,14 @@ public class TestDataHelper { channelId = channel1.id, message = message1Deleted, hardDelete = false, + channelLastMessageAt = randomDate(), ) } - public val messageHardDeletedEvent: MessageDeletedEvent by lazy { + public val messageHardDeletedEvent: MessageDeletedEvent1 by lazy { val createdAt = Date() - MessageDeletedEvent( + MessageDeletedEvent1( type = EventType.MESSAGE_DELETED, createdAt = Date(), rawCreatedAt = streamFormatter.format(createdAt), @@ -395,6 +402,7 @@ public class TestDataHelper { channelId = channel1.id, message = message1Deleted, hardDelete = true, + channelLastMessageAt = randomDate(), ) } @@ -402,44 +410,47 @@ public class TestDataHelper { val createdAt = Date() UserStartWatchingEvent( - EventType.USER_WATCHING_START, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - 1, - channel1.type, - channel1.id, - user1, + type = EventType.USER_WATCHING_START, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + watcherCount = 1, + channelType = channel1.type, + channelId = channel1.id, + user = user1, + channelLastMessageAt = randomDate(), ) } public val reactionEvent: ReactionNewEvent by lazy { val createdAt = Date() ReactionNewEvent( - EventType.REACTION_NEW, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - reactionMessage1, - reaction1, + type = EventType.REACTION_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = reactionMessage1, + reaction = reaction1, + channelLastMessageAt = randomDate(), ) } public val reactionEvent2: ReactionNewEvent by lazy { val createdAt = Date() ReactionNewEvent( - EventType.REACTION_NEW, - createdAt, - streamFormatter.format(createdAt), - user2, - channel1.cid, - channel1.type, - channel1.id, - reactionMessage2, - reaction2, + type = EventType.REACTION_NEW, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user2, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + message = reactionMessage2, + reaction = reaction2, + channelLastMessageAt = randomDate(), ) } @@ -447,28 +458,30 @@ public class TestDataHelper { val createdAt = Date() ChannelUpdatedEvent( - EventType.CHANNEL_UPDATED, - createdAt, - streamFormatter.format(createdAt), - channel1Updated.cid, - channel1Updated.type, - channel1Updated.id, - null, - channel1Updated, + type = EventType.CHANNEL_UPDATED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1Updated.cid, + channelType = channel1Updated.type, + channelId = channel1Updated.id, + channel = channel1Updated, + channelLastMessageAt = randomDate(), + message = null, ) } public val channelUpdatedEvent2: ChannelUpdatedEvent by lazy { val createdAt = Date() ChannelUpdatedEvent( - EventType.CHANNEL_UPDATED, - createdAt, - streamFormatter.format(createdAt), - channel5.cid, - channel5.type, - channel5.id, - null, - channel5, + type = EventType.CHANNEL_UPDATED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel5.cid, + channelType = channel5.type, + channelId = channel5.id, + channel = channel5, + channelLastMessageAt = randomDate(), + message = null, ) } @@ -476,28 +489,30 @@ public class TestDataHelper { val createdAt = Date() TypingStartEvent( - EventType.TYPING_START, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - parentMessageId, + type = EventType.TYPING_START, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channelLastMessageAt = randomDate(), + parentId = parentMessageId, ) } public val user3TypingStartedOld: TypingStartEvent by lazy { val createdAt = getOldDate() TypingStartEvent( - EventType.TYPING_START, - createdAt, - streamFormatter.format(createdAt), - user3, - channel1.cid, - channel1.type, - channel1.id, - parentMessageId, + type = EventType.TYPING_START, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user3, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channelLastMessageAt = randomDate(), + parentId = parentMessageId, ) } @@ -505,27 +520,29 @@ public class TestDataHelper { val createdAt = Date() ChannelHiddenEvent( - EventType.CHANNEL_HIDDEN, - createdAt, - streamFormatter.format(createdAt), - channel2.cid, - channel2.type, - channel2.id, - user1, - false, + type = EventType.CHANNEL_HIDDEN, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + user = user1, + channelLastMessageAt = randomDate(), + clearHistory = false, ) } public val channelVisibleEvent: ChannelVisibleEvent by lazy { val createdAt = Date() ChannelVisibleEvent( - EventType.CHANNEL_VISIBLE, - createdAt, - streamFormatter.format(createdAt), - channel2.cid, - channel2.type, - channel2.id, - user1, + type = EventType.CHANNEL_VISIBLE, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + user = user1, + channelLastMessageAt = randomDate(), ) } @@ -533,41 +550,44 @@ public class TestDataHelper { val createdAt = Date() TypingStartEvent( - EventType.TYPING_START, - createdAt, - streamFormatter.format(createdAt), - user2, - channel2.cid, - channel2.type, - channel2.id, - parentMessageId, + type = EventType.TYPING_START, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user2, + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + channelLastMessageAt = randomDate(), + parentId = parentMessageId, ) } public val user1TypingStop: TypingStopEvent by lazy { val createdAt = Date() TypingStopEvent( - EventType.TYPING_STOP, - createdAt, - streamFormatter.format(createdAt), - user1, - channel2.cid, - channel2.type, - channel2.id, - parentMessageId, + type = EventType.TYPING_STOP, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + channelLastMessageAt = randomDate(), + parentId = parentMessageId, ) } public val readEvent: MessageReadEvent by lazy { val createdAt = Date() MessageReadEvent( - EventType.MESSAGE_READ, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, + type = EventType.MESSAGE_READ, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channelLastMessageAt = randomDate(), ) } @@ -575,10 +595,10 @@ public class TestDataHelper { val createdAt = Date() NotificationMutesUpdatedEvent( - EventType.NOTIFICATION_MUTES_UPDATED, - Date(), - streamFormatter.format(createdAt), - me1, + type = EventType.NOTIFICATION_MUTES_UPDATED, + createdAt = Date(), + rawCreatedAt = streamFormatter.format(createdAt), + me = me1, ) } @@ -586,28 +606,30 @@ public class TestDataHelper { val createdAt = Date() ChannelUserBannedEvent( - EventType.USER_BANNED, - createdAt, - streamFormatter.format(createdAt), - channel2.cid, - channel2.type, - channel2.id, - user1, - null, - false, + type = EventType.USER_BANNED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + user = user1, + channelLastMessageAt = randomDate(), + expiration = null, + shadow = false, ) } public val user1Unbanned: ChannelUserUnbannedEvent by lazy { val createdAt = Date() ChannelUserUnbannedEvent( - EventType.USER_UNBANNED, - createdAt, - streamFormatter.format(createdAt), - user1, - channel2.cid, - channel2.type, - channel2.id, + type = EventType.USER_UNBANNED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + channelLastMessageAt = randomDate(), ) } @@ -615,42 +637,45 @@ public class TestDataHelper { val createdAt = Date() NotificationMarkReadEvent( - EventType.NOTIFICATION_MARK_READ, - createdAt, - streamFormatter.format(createdAt), - user1, - channel2.cid, - channel2.type, - channel2.id, - 0, - 0, + type = EventType.NOTIFICATION_MARK_READ, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } public val user1Read: MessageReadEvent by lazy { val createdAt = Date() MessageReadEvent( - EventType.MESSAGE_READ, - createdAt, - streamFormatter.format(createdAt), - user1, - channel2.cid, - channel2.type, - channel2.id, + type = EventType.MESSAGE_READ, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + channelLastMessageAt = randomDate(), ) } public val memberAddedToChannelEvent: MemberAddedEvent by lazy { val createdAt = Date() MemberAddedEvent( - EventType.MEMBER_ADDED, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1WithNewMember.cid, - channel1WithNewMember.type, - channel1WithNewMember.id, - member2, + type = EventType.MEMBER_ADDED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = user1, + cid = channel1WithNewMember.cid, + channelType = channel1WithNewMember.type, + channelId = channel1WithNewMember.id, + member = member2, + channelLastMessageAt = randomDate(), ) } @@ -659,14 +684,15 @@ public class TestDataHelper { val createdAt = Date() MemberRemovedEvent( - EventType.MEMBER_REMOVED, - createdAt, - streamFormatter.format(createdAt), - member2.user, - channel1.cid, - channel1.type, - channel1.id, - member1, + type = EventType.MEMBER_REMOVED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + user = member2.user, + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + member = member1, + channelLastMessageAt = randomDate(), ) } @@ -674,15 +700,16 @@ public class TestDataHelper { val createdAt = Date() NotificationRemovedFromChannelEvent( - EventType.NOTIFICATION_REMOVED_FROM_CHANNEL, - createdAt, - streamFormatter.format(createdAt), - user1, - channel1.cid, - channel1.type, - channel1.id, - channel1, - member1, + type = EventType.NOTIFICATION_REMOVED_FROM_CHANNEL, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + channelLastMessageAt = randomDate(), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + member = member1, + user = user1, ) } @@ -691,32 +718,34 @@ public class TestDataHelper { val createdAt = Date() NotificationAddedToChannelEvent( - EventType.NOTIFICATION_ADDED_TO_CHANNEL, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - channel1.type, - channel1.id, - channel1, - member1, - 0, - 0, + type = EventType.NOTIFICATION_ADDED_TO_CHANNEL, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + member = member1, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } public val notificationAddedToChannel2Event: NotificationAddedToChannelEvent by lazy { val createdAt = Date() NotificationAddedToChannelEvent( - EventType.NOTIFICATION_ADDED_TO_CHANNEL, - createdAt, - streamFormatter.format(createdAt), - channel2.cid, - channel2.type, - channel2.id, - channel2, - member2, - 0, - 0, + type = EventType.NOTIFICATION_ADDED_TO_CHANNEL, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel2.cid, + channelType = channel2.type, + channelId = channel2.id, + channel = channel2, + member = member2, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } @@ -725,16 +754,17 @@ public class TestDataHelper { val createdAt = Date() NotificationAddedToChannelEvent( - EventType.NOTIFICATION_ADDED_TO_CHANNEL, - createdAt, - streamFormatter.format(createdAt), - channel3.cid, - channel3.type, - channel3.id, - channel3, - member3, - 0, - 0, + type = EventType.NOTIFICATION_ADDED_TO_CHANNEL, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel3.cid, + channelType = channel3.type, + channelId = channel3.id, + channel = channel3, + member = member3, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = randomDate(), ) } public val user1UpdatedEvent: UserUpdatedEvent by lazy { @@ -749,42 +779,45 @@ public class TestDataHelper { val createdAt = Date() ChannelTruncatedEvent( - EventType.CHANNEL_TRUNCATED, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - channel1.type, - channel1.id, - user1, - null, - channel1, + type = EventType.CHANNEL_TRUNCATED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + channelLastMessageAt = randomDate(), + user = user1, + message = null, ) } public val notificationChannelTruncated: NotificationChannelTruncatedEvent by lazy { val createdAt = Date() NotificationChannelTruncatedEvent( - EventType.NOTIFICATION_CHANNEL_TRUNCATED, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - channel1.type, - channel1.id, - channel1, + type = EventType.NOTIFICATION_CHANNEL_TRUNCATED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + channelLastMessageAt = randomDate(), ) } public val channelDeletedEvent: ChannelDeletedEvent by lazy { val createdAt = Date() ChannelDeletedEvent( - EventType.CHANNEL_DELETED, - createdAt, - streamFormatter.format(createdAt), - channel1.cid, - channel1.type, - channel1.id, - channel1, - null, + type = EventType.CHANNEL_DELETED, + createdAt = createdAt, + rawCreatedAt = streamFormatter.format(createdAt), + cid = channel1.cid, + channelType = channel1.type, + channelId = channel1.id, + channel = channel1, + channelLastMessageAt = randomDate(), + user = null, ) } } diff --git a/stream-chat-android-client/api/stream-chat-android-client.api b/stream-chat-android-client/api/stream-chat-android-client.api index 4f36c345e72..7287ecea964 100644 --- a/stream-chat-android-client/api/stream-chat-android-client.api +++ b/stream-chat-android-client/api/stream-chat-android-client.api @@ -924,7 +924,7 @@ public abstract class io/getstream/chat/android/client/errors/cause/StreamSdkExc } public final class io/getstream/chat/android/client/events/AnswerCastedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Answer;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Answer;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -932,11 +932,13 @@ public final class io/getstream/chat/android/client/events/AnswerCastedEvent : i public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun component8 ()Lio/getstream/chat/android/models/Answer; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Answer;)Lio/getstream/chat/android/client/events/AnswerCastedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/AnswerCastedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Answer;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/AnswerCastedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/Answer; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Answer;)Lio/getstream/chat/android/client/events/AnswerCastedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/AnswerCastedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Answer;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/AnswerCastedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -949,7 +951,7 @@ public final class io/getstream/chat/android/client/events/AnswerCastedEvent : i } public final class io/getstream/chat/android/client/events/ChannelDeletedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/User;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -957,12 +959,14 @@ public final class io/getstream/chat/android/client/events/ChannelDeletedEvent : public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Channel; - public final fun component8 ()Lio/getstream/chat/android/models/User; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/ChannelDeletedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelDeletedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/User; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/ChannelDeletedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelDeletedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -974,7 +978,7 @@ public final class io/getstream/chat/android/client/events/ChannelDeletedEvent : } public final class io/getstream/chat/android/client/events/ChannelHiddenEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Z)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Z)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -982,11 +986,13 @@ public final class io/getstream/chat/android/client/events/ChannelHiddenEvent : public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/User; - public final fun component8 ()Z - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Z)Lio/getstream/chat/android/client/events/ChannelHiddenEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelHiddenEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelHiddenEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Z + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Z)Lio/getstream/chat/android/client/events/ChannelHiddenEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelHiddenEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelHiddenEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public final fun getClearHistory ()Z @@ -999,21 +1005,23 @@ public final class io/getstream/chat/android/client/events/ChannelHiddenEvent : } public final class io/getstream/chat/android/client/events/ChannelTruncatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Lio/getstream/chat/android/models/Message; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; - public final fun component7 ()Lio/getstream/chat/android/models/User; - public final fun component8 ()Lio/getstream/chat/android/models/Message; - public final fun component9 ()Lio/getstream/chat/android/models/Channel; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)Lio/getstream/chat/android/client/events/ChannelTruncatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelTruncatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelTruncatedEvent; + public final fun component7 ()Lio/getstream/chat/android/models/Channel; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/User; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;)Lio/getstream/chat/android/client/events/ChannelTruncatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelTruncatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelTruncatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1026,21 +1034,23 @@ public final class io/getstream/chat/android/client/events/ChannelTruncatedEvent } public final class io/getstream/chat/android/client/events/ChannelUpdatedByUserEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Lio/getstream/chat/android/models/Message; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/User; - public final fun component8 ()Lio/getstream/chat/android/models/Message; - public final fun component9 ()Lio/getstream/chat/android/models/Channel; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent; + public final fun component8 ()Lio/getstream/chat/android/models/Channel; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;)Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUpdatedByUserEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1053,20 +1063,22 @@ public final class io/getstream/chat/android/client/events/ChannelUpdatedByUserE } public final class io/getstream/chat/android/client/events/ChannelUpdatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; - public final fun component7 ()Lio/getstream/chat/android/models/Message; - public final fun component8 ()Lio/getstream/chat/android/models/Channel; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;)Lio/getstream/chat/android/client/events/ChannelUpdatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUpdatedEvent; + public final fun component7 ()Lio/getstream/chat/android/models/Channel; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/Message; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;)Lio/getstream/chat/android/client/events/ChannelUpdatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Lio/getstream/chat/android/models/Message;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUpdatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1078,8 +1090,9 @@ public final class io/getstream/chat/android/client/events/ChannelUpdatedEvent : } public final class io/getstream/chat/android/client/events/ChannelUserBannedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Z)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Ljava/util/Date;Z)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Z public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1087,11 +1100,12 @@ public final class io/getstream/chat/android/client/events/ChannelUserBannedEven public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/User; public final fun component8 ()Ljava/util/Date; - public final fun component9 ()Z - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Z)Lio/getstream/chat/android/client/events/ChannelUserBannedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUserBannedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUserBannedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Ljava/util/Date;Z)Lio/getstream/chat/android/client/events/ChannelUserBannedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUserBannedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;Ljava/util/Date;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUserBannedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1105,7 +1119,7 @@ public final class io/getstream/chat/android/client/events/ChannelUserBannedEven } public final class io/getstream/chat/android/client/events/ChannelUserUnbannedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1113,10 +1127,12 @@ public final class io/getstream/chat/android/client/events/ChannelUserUnbannedEv public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelUserUnbannedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1128,7 +1144,7 @@ public final class io/getstream/chat/android/client/events/ChannelUserUnbannedEv } public final class io/getstream/chat/android/client/events/ChannelVisibleEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1136,10 +1152,12 @@ public final class io/getstream/chat/android/client/events/ChannelVisibleEvent : public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/User; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/ChannelVisibleEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelVisibleEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelVisibleEvent; + public final fun component8 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)Lio/getstream/chat/android/client/events/ChannelVisibleEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ChannelVisibleEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ChannelVisibleEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1159,6 +1177,7 @@ public abstract class io/getstream/chat/android/client/events/ChatEvent { public abstract class io/getstream/chat/android/client/events/CidEvent : io/getstream/chat/android/client/events/ChatEvent { public abstract fun getChannelId ()Ljava/lang/String; + public abstract fun getChannelLastMessageAt ()Ljava/util/Date; public abstract fun getChannelType ()Ljava/lang/String; public abstract fun getCid ()Ljava/lang/String; } @@ -1363,7 +1382,7 @@ public final class io/getstream/chat/android/client/events/MarkAllReadEvent : io } public final class io/getstream/chat/android/client/events/MemberAddedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1372,10 +1391,12 @@ public final class io/getstream/chat/android/client/events/MemberAddedEvent : io public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Member; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/client/events/MemberAddedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberAddedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberAddedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)Lio/getstream/chat/android/client/events/MemberAddedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberAddedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberAddedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1388,7 +1409,7 @@ public final class io/getstream/chat/android/client/events/MemberAddedEvent : io } public final class io/getstream/chat/android/client/events/MemberRemovedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1397,10 +1418,12 @@ public final class io/getstream/chat/android/client/events/MemberRemovedEvent : public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Member; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/client/events/MemberRemovedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberRemovedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberRemovedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)Lio/getstream/chat/android/client/events/MemberRemovedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberRemovedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberRemovedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1413,7 +1436,7 @@ public final class io/getstream/chat/android/client/events/MemberRemovedEvent : } public final class io/getstream/chat/android/client/events/MemberUpdatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1422,10 +1445,12 @@ public final class io/getstream/chat/android/client/events/MemberUpdatedEvent : public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Member; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/client/events/MemberUpdatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberUpdatedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)Lio/getstream/chat/android/client/events/MemberUpdatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MemberUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Member;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MemberUpdatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1438,20 +1463,22 @@ public final class io/getstream/chat/android/client/events/MemberUpdatedEvent : } public final class io/getstream/chat/android/client/events/MessageDeletedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Z)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;Lio/getstream/chat/android/models/User;Z)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Z public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Lio/getstream/chat/android/models/User; + public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; - public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Lio/getstream/chat/android/models/Message; - public final fun component9 ()Z - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Z)Lio/getstream/chat/android/client/events/MessageDeletedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageDeletedEvent; + public final fun component7 ()Lio/getstream/chat/android/models/Message; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/User; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;Lio/getstream/chat/android/models/User;Z)Lio/getstream/chat/android/client/events/MessageDeletedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;Lio/getstream/chat/android/models/User;ZILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageDeletedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1465,8 +1492,8 @@ public final class io/getstream/chat/android/client/events/MessageDeletedEvent : } public final class io/getstream/chat/android/client/events/MessageReadEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Lio/getstream/chat/android/models/ThreadInfo;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Lio/getstream/chat/android/models/ThreadInfo;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1474,11 +1501,13 @@ public final class io/getstream/chat/android/client/events/MessageReadEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Lio/getstream/chat/android/models/ThreadInfo; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;)Lio/getstream/chat/android/client/events/MessageReadEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageReadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageReadEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/ThreadInfo; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Lio/getstream/chat/android/models/ThreadInfo;)Lio/getstream/chat/android/client/events/MessageReadEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageReadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Lio/getstream/chat/android/models/ThreadInfo;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageReadEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1491,7 +1520,7 @@ public final class io/getstream/chat/android/client/events/MessageReadEvent : io } public final class io/getstream/chat/android/client/events/MessageUpdatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1500,10 +1529,12 @@ public final class io/getstream/chat/android/client/events/MessageUpdatedEvent : public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Message; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;)Lio/getstream/chat/android/client/events/MessageUpdatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageUpdatedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;)Lio/getstream/chat/android/client/events/MessageUpdatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/MessageUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/MessageUpdatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1516,11 +1547,12 @@ public final class io/getstream/chat/android/client/events/MessageUpdatedEvent : } public final class io/getstream/chat/android/client/events/NewMessageEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasUnreadCounts, io/getstream/chat/android/client/events/HasWatcherCount, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;III)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIILjava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIILjava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()I public final fun component11 ()I + public final fun component12 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -1529,10 +1561,11 @@ public final class io/getstream/chat/android/client/events/NewMessageEvent : io/ public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Message; public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;III)Lio/getstream/chat/android/client/events/NewMessageEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NewMessageEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NewMessageEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIILjava/util/Date;)Lio/getstream/chat/android/client/events/NewMessageEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NewMessageEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;IIILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NewMessageEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1548,10 +1581,11 @@ public final class io/getstream/chat/android/client/events/NewMessageEvent : io/ } public final class io/getstream/chat/android/client/events/NotificationAddedToChannelEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/HasUnreadCounts { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;II)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IILjava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IILjava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()I + public final fun component11 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1560,11 +1594,12 @@ public final class io/getstream/chat/android/client/events/NotificationAddedToCh public final fun component7 ()Lio/getstream/chat/android/models/Channel; public final fun component8 ()Lio/getstream/chat/android/models/Member; public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;II)Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IILjava/util/Date;)Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;IILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationAddedToChannelEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1578,9 +1613,10 @@ public final class io/getstream/chat/android/client/events/NotificationAddedToCh } public final class io/getstream/chat/android/client/events/NotificationChannelDeletedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasUnreadCounts { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;II)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1589,11 +1625,12 @@ public final class io/getstream/chat/android/client/events/NotificationChannelDe public final fun component7 ()Lio/getstream/chat/android/models/Channel; public final fun component8 ()I public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;II)Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;)Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationChannelDeletedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1623,9 +1660,10 @@ public final class io/getstream/chat/android/client/events/NotificationChannelMu } public final class io/getstream/chat/android/client/events/NotificationChannelTruncatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasUnreadCounts { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;II)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1634,11 +1672,12 @@ public final class io/getstream/chat/android/client/events/NotificationChannelTr public final fun component7 ()Lio/getstream/chat/android/models/Channel; public final fun component8 ()I public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;II)Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;)Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;IILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationChannelTruncatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1651,8 +1690,9 @@ public final class io/getstream/chat/android/client/events/NotificationChannelTr } public final class io/getstream/chat/android/client/events/NotificationInviteAcceptedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1661,11 +1701,12 @@ public final class io/getstream/chat/android/client/events/NotificationInviteAcc public final fun component7 ()Lio/getstream/chat/android/models/User; public final fun component8 ()Lio/getstream/chat/android/models/Member; public final fun component9 ()Lio/getstream/chat/android/models/Channel; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;)Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;)Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInviteAcceptedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1678,8 +1719,9 @@ public final class io/getstream/chat/android/client/events/NotificationInviteAcc } public final class io/getstream/chat/android/client/events/NotificationInviteRejectedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1688,11 +1730,12 @@ public final class io/getstream/chat/android/client/events/NotificationInviteRej public final fun component7 ()Lio/getstream/chat/android/models/User; public final fun component8 ()Lio/getstream/chat/android/models/Member; public final fun component9 ()Lio/getstream/chat/android/models/Channel; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;)Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;)Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInviteRejectedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1705,7 +1748,7 @@ public final class io/getstream/chat/android/client/events/NotificationInviteRej } public final class io/getstream/chat/android/client/events/NotificationInvitedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMember, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1714,10 +1757,12 @@ public final class io/getstream/chat/android/client/events/NotificationInvitedEv public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/User; public final fun component8 ()Lio/getstream/chat/android/models/Member; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/client/events/NotificationInvitedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInvitedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInvitedEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Ljava/util/Date;)Lio/getstream/chat/android/client/events/NotificationInvitedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationInvitedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationInvitedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1730,13 +1775,14 @@ public final class io/getstream/chat/android/client/events/NotificationInvitedEv } public final class io/getstream/chat/android/client/events/NotificationMarkReadEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasUnreadCounts, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; - public final fun component10 ()Ljava/lang/String; - public final fun component11 ()Lio/getstream/chat/android/models/ThreadInfo; - public final fun component12 ()Ljava/lang/Integer; + public final fun component10 ()Ljava/util/Date; + public final fun component11 ()Ljava/lang/String; + public final fun component12 ()Lio/getstream/chat/android/models/ThreadInfo; public final fun component13 ()Ljava/lang/Integer; + public final fun component14 ()Ljava/lang/Integer; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -1745,10 +1791,11 @@ public final class io/getstream/chat/android/client/events/NotificationMarkReadE public final fun component7 ()Ljava/lang/String; public final fun component8 ()I public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;)Lio/getstream/chat/android/client/events/NotificationMarkReadEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMarkReadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMarkReadEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;)Lio/getstream/chat/android/client/events/NotificationMarkReadEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMarkReadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/ThreadInfo;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMarkReadEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1766,15 +1813,16 @@ public final class io/getstream/chat/android/client/events/NotificationMarkReadE } public final class io/getstream/chat/android/client/events/NotificationMarkUnreadEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasUnreadCounts, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;I)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;ILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;I)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;ILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; - public final fun component10 ()I - public final fun component11 ()Ljava/lang/String; - public final fun component12 ()Ljava/util/Date; - public final fun component13 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; + public final fun component11 ()I + public final fun component12 ()Ljava/lang/String; + public final fun component13 ()Ljava/util/Date; public final fun component14 ()Ljava/lang/String; - public final fun component15 ()I + public final fun component15 ()Ljava/lang/String; + public final fun component16 ()I public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -1783,10 +1831,11 @@ public final class io/getstream/chat/android/client/events/NotificationMarkUnrea public final fun component7 ()Ljava/lang/String; public final fun component8 ()I public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;I)Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;ILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;I)Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/util/Date;ILjava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMarkUnreadEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1806,10 +1855,11 @@ public final class io/getstream/chat/android/client/events/NotificationMarkUnrea } public final class io/getstream/chat/android/client/events/NotificationMessageNewEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasUnreadCounts { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;II)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IILjava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IILjava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()I + public final fun component11 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1818,11 +1868,12 @@ public final class io/getstream/chat/android/client/events/NotificationMessageNe public final fun component7 ()Lio/getstream/chat/android/models/Channel; public final fun component8 ()Lio/getstream/chat/android/models/Message; public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;II)Lio/getstream/chat/android/client/events/NotificationMessageNewEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMessageNewEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMessageNewEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IILjava/util/Date;)Lio/getstream/chat/android/client/events/NotificationMessageNewEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationMessageNewEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Message;IILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationMessageNewEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1853,21 +1904,23 @@ public final class io/getstream/chat/android/client/events/NotificationMutesUpda } public final class io/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMember { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/User;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Lio/getstream/chat/android/models/User; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Lio/getstream/chat/android/models/User; + public final fun component4 ()Ljava/util/Date; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Channel; public final fun component9 ()Lio/getstream/chat/android/models/Member; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Channel;Lio/getstream/chat/android/models/Member;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationRemovedFromChannelEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1880,9 +1933,10 @@ public final class io/getstream/chat/android/client/events/NotificationRemovedFr } public final class io/getstream/chat/android/client/events/NotificationThreadMessageNewEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasChannel, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasUnreadThreadCounts { - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;II)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;IILjava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()I + public final fun component11 ()Ljava/util/Date; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -1891,11 +1945,12 @@ public final class io/getstream/chat/android/client/events/NotificationThreadMes public final fun component7 ()Ljava/util/Date; public final fun component8 ()Ljava/lang/String; public final fun component9 ()I - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;II)Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;IIILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;IILjava/util/Date;)Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Channel;Ljava/util/Date;Ljava/lang/String;IILjava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/NotificationThreadMessageNewEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannel ()Lio/getstream/chat/android/models/Channel; public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1909,7 +1964,7 @@ public final class io/getstream/chat/android/client/events/NotificationThreadMes } public final class io/getstream/chat/android/client/events/PollClosedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1917,10 +1972,12 @@ public final class io/getstream/chat/android/client/events/PollClosedEvent : io/ public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)Lio/getstream/chat/android/client/events/PollClosedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollClosedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollClosedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)Lio/getstream/chat/android/client/events/PollClosedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollClosedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollClosedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1932,7 +1989,7 @@ public final class io/getstream/chat/android/client/events/PollClosedEvent : io/ } public final class io/getstream/chat/android/client/events/PollDeletedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1940,10 +1997,12 @@ public final class io/getstream/chat/android/client/events/PollDeletedEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)Lio/getstream/chat/android/client/events/PollDeletedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollDeletedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)Lio/getstream/chat/android/client/events/PollDeletedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollDeletedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1955,7 +2014,7 @@ public final class io/getstream/chat/android/client/events/PollDeletedEvent : io } public final class io/getstream/chat/android/client/events/PollUpdatedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -1963,10 +2022,12 @@ public final class io/getstream/chat/android/client/events/PollUpdatedEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;)Lio/getstream/chat/android/client/events/PollUpdatedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollUpdatedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;)Lio/getstream/chat/android/client/events/PollUpdatedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/PollUpdatedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/PollUpdatedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -1978,8 +2039,9 @@ public final class io/getstream/chat/android/client/events/PollUpdatedEvent : io } public final class io/getstream/chat/android/client/events/ReactionDeletedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasReaction, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -1988,10 +2050,11 @@ public final class io/getstream/chat/android/client/events/ReactionDeletedEvent public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Message; public final fun component9 ()Lio/getstream/chat/android/models/Reaction; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)Lio/getstream/chat/android/client/events/ReactionDeletedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionDeletedEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)Lio/getstream/chat/android/client/events/ReactionDeletedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionDeletedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionDeletedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2005,8 +2068,9 @@ public final class io/getstream/chat/android/client/events/ReactionDeletedEvent } public final class io/getstream/chat/android/client/events/ReactionNewEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasReaction, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -2015,10 +2079,11 @@ public final class io/getstream/chat/android/client/events/ReactionNewEvent : io public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Message; public final fun component9 ()Lio/getstream/chat/android/models/Reaction; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)Lio/getstream/chat/android/client/events/ReactionNewEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionNewEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionNewEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)Lio/getstream/chat/android/client/events/ReactionNewEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionNewEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionNewEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2032,8 +2097,9 @@ public final class io/getstream/chat/android/client/events/ReactionNewEvent : io } public final class io/getstream/chat/android/client/events/ReactionUpdateEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasMessage, io/getstream/chat/android/client/events/HasReaction, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)V public final fun component1 ()Ljava/lang/String; + public final fun component10 ()Ljava/util/Date; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Lio/getstream/chat/android/models/User; @@ -2042,10 +2108,11 @@ public final class io/getstream/chat/android/client/events/ReactionUpdateEvent : public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/Message; public final fun component9 ()Lio/getstream/chat/android/models/Reaction; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;)Lio/getstream/chat/android/client/events/ReactionUpdateEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionUpdateEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionUpdateEvent; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;)Lio/getstream/chat/android/client/events/ReactionUpdateEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/ReactionUpdateEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/Reaction;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/ReactionUpdateEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2059,7 +2126,7 @@ public final class io/getstream/chat/android/client/events/ReactionUpdateEvent : } public final class io/getstream/chat/android/client/events/TypingStartEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2067,11 +2134,13 @@ public final class io/getstream/chat/android/client/events/TypingStartEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/getstream/chat/android/client/events/TypingStartEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/TypingStartEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/TypingStartEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)Lio/getstream/chat/android/client/events/TypingStartEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/TypingStartEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/TypingStartEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2084,7 +2153,7 @@ public final class io/getstream/chat/android/client/events/TypingStartEvent : io } public final class io/getstream/chat/android/client/events/TypingStopEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2092,11 +2161,13 @@ public final class io/getstream/chat/android/client/events/TypingStopEvent : io/ public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/getstream/chat/android/client/events/TypingStopEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/TypingStopEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/TypingStopEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)Lio/getstream/chat/android/client/events/TypingStopEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/TypingStopEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/TypingStopEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2166,8 +2237,8 @@ public final class io/getstream/chat/android/client/events/UserPresenceChangedEv } public final class io/getstream/chat/android/client/events/UserStartWatchingEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasWatcherCount, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2176,10 +2247,12 @@ public final class io/getstream/chat/android/client/events/UserStartWatchingEven public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/User; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/UserStartWatchingEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/UserStartWatchingEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/UserStartWatchingEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)Lio/getstream/chat/android/client/events/UserStartWatchingEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/UserStartWatchingEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/UserStartWatchingEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2192,8 +2265,8 @@ public final class io/getstream/chat/android/client/events/UserStartWatchingEven } public final class io/getstream/chat/android/client/events/UserStopWatchingEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasWatcherCount, io/getstream/chat/android/client/events/UserEvent { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)V - public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)V + public synthetic fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2202,10 +2275,12 @@ public final class io/getstream/chat/android/client/events/UserStopWatchingEvent public final fun component6 ()Ljava/lang/String; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Lio/getstream/chat/android/models/User; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;)Lio/getstream/chat/android/client/events/UserStopWatchingEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/UserStopWatchingEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/UserStopWatchingEvent; + public final fun component9 ()Ljava/util/Date; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;)Lio/getstream/chat/android/client/events/UserStopWatchingEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/UserStopWatchingEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/User;Ljava/util/Date;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/UserStopWatchingEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2235,7 +2310,7 @@ public final class io/getstream/chat/android/client/events/UserUpdatedEvent : io } public final class io/getstream/chat/android/client/events/VoteCastedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2243,11 +2318,13 @@ public final class io/getstream/chat/android/client/events/VoteCastedEvent : io/ public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun component8 ()Lio/getstream/chat/android/models/Vote; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteCastedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteCastedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteCastedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/Vote; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteCastedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteCastedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteCastedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2260,7 +2337,7 @@ public final class io/getstream/chat/android/client/events/VoteCastedEvent : io/ } public final class io/getstream/chat/android/client/events/VoteChangedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2268,11 +2345,13 @@ public final class io/getstream/chat/android/client/events/VoteChangedEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun component8 ()Lio/getstream/chat/android/models/Vote; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteChangedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteChangedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteChangedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/Vote; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteChangedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteChangedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteChangedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; @@ -2285,7 +2364,7 @@ public final class io/getstream/chat/android/client/events/VoteChangedEvent : io } public final class io/getstream/chat/android/client/events/VoteRemovedEvent : io/getstream/chat/android/client/events/CidEvent, io/getstream/chat/android/client/events/HasPoll { - public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)V + public fun (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component3 ()Ljava/lang/String; @@ -2293,11 +2372,13 @@ public final class io/getstream/chat/android/client/events/VoteRemovedEvent : io public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lio/getstream/chat/android/models/Poll; - public final fun component8 ()Lio/getstream/chat/android/models/Vote; - public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteRemovedEvent; - public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteRemovedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteRemovedEvent; + public final fun component8 ()Ljava/util/Date; + public final fun component9 ()Lio/getstream/chat/android/models/Vote; + public final fun copy (Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;)Lio/getstream/chat/android/client/events/VoteRemovedEvent; + public static synthetic fun copy$default (Lio/getstream/chat/android/client/events/VoteRemovedEvent;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/getstream/chat/android/models/Poll;Ljava/util/Date;Lio/getstream/chat/android/models/Vote;ILjava/lang/Object;)Lio/getstream/chat/android/client/events/VoteRemovedEvent; public fun equals (Ljava/lang/Object;)Z public fun getChannelId ()Ljava/lang/String; + public fun getChannelLastMessageAt ()Ljava/util/Date; public fun getChannelType ()Ljava/lang/String; public fun getCid ()Ljava/lang/String; public fun getCreatedAt ()Ljava/util/Date; diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt index e845f7905d5..96d0f7a8500 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt @@ -786,7 +786,7 @@ constructor( } private fun flattenChannel(response: ChannelResponse): Channel { - return response.channel.toDomain(currentUserIdProvider()).let { channel -> + return response.channel.toDomain(currentUserIdProvider(), null).let { channel -> channel.copy( watcherCount = response.watcher_count, read = response.read.map { diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/BannedUserMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/BannedUserMapping.kt index 25b1e3a50e3..6a5d05b91e1 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/BannedUserMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/BannedUserMapping.kt @@ -24,7 +24,7 @@ internal fun BannedUserResponse.toDomain(currentUserId: UserId?): BannedUser { return BannedUser( user = user.toDomain(currentUserId), bannedBy = banned_by?.toDomain(currentUserId), - channel = channel?.toDomain(currentUserId), + channel = channel?.toDomain(currentUserId, null), createdAt = created_at, expires = expires, shadow = shadow, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMapping.kt index 517caf147fa..7f5eb137c13 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMapping.kt @@ -21,8 +21,12 @@ import io.getstream.chat.android.client.extensions.syncUnreadCountWithReads import io.getstream.chat.android.models.Channel import io.getstream.chat.android.models.User import io.getstream.chat.android.models.UserId +import java.util.Date -internal fun DownstreamChannelDto.toDomain(currentUserId: UserId?): Channel = +internal fun DownstreamChannelDto.toDomain( + currentUserId: UserId?, + eventChatLastMessageAt: Date?, +): Channel = Channel( id = id, type = type, @@ -30,7 +34,7 @@ internal fun DownstreamChannelDto.toDomain(currentUserId: UserId?): Channel = image = image ?: "", watcherCount = watcher_count, frozen = frozen, - lastMessageAt = last_message_at, + channelLastMessageAt = eventChatLastMessageAt ?: last_message_at, createdAt = created_at, deletedAt = deleted_at, updatedAt = updated_at, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMuteMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMuteMapping.kt index c1106d2784b..741cb42b155 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMuteMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ChannelMuteMapping.kt @@ -23,7 +23,7 @@ import io.getstream.chat.android.models.UserId internal fun DownstreamChannelMuteDto.toDomain(currentUserId: UserId?): ChannelMute = ChannelMute( user = user?.toDomain(currentUserId), - channel = channel?.toDomain(currentUserId), + channel = channel?.toDomain(currentUserId, null), createdAt = created_at, updatedAt = updated_at, expires = expires, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ConfigMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ConfigMapping.kt index 51d945d88b9..dfdde86337b 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ConfigMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ConfigMapping.kt @@ -36,6 +36,7 @@ internal fun ConfigDto.toDomain(): Config = urlEnrichmentEnabled = url_enrichment, customEventsEnabled = custom_events, pushNotificationsEnabled = push_notifications, + skipLastMsgUpdateForSystemMsgs = skip_last_msg_update_for_system_msgs ?: false, pollsEnabled = polls, messageRetention = message_retention, maxMessageLength = max_message_length, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/EventMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/EventMapping.kt index aeab166d8b3..7a064d47ee5 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/EventMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/EventMapping.kt @@ -212,8 +212,9 @@ private fun ChannelDeletedEventDto.toDomain(currentUserId: UserId?): ChannelDele cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), user = user?.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -227,6 +228,7 @@ private fun ChannelHiddenEventDto.toDomain(currentUserId: UserId?): ChannelHidde channelId = channel_id, user = user.toDomain(currentUserId), clearHistory = clear_history, + channelLastMessageAt = channel_last_message_at, ) } @@ -240,7 +242,8 @@ private fun ChannelTruncatedEventDto.toDomain(currentUserId: UserId?): ChannelTr channelId = channel_id, user = user?.toDomain(currentUserId), message = message?.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), + channelLastMessageAt = channel_last_message_at, ) } @@ -253,7 +256,8 @@ private fun ChannelUpdatedEventDto.toDomain(currentUserId: UserId?): ChannelUpda channelType = channel_type, channelId = channel_id, message = message?.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), + channelLastMessageAt = channel_last_message_at, ) } @@ -267,7 +271,8 @@ private fun ChannelUpdatedByUserEventDto.toDomain(currentUserId: UserId?): Chann channelId = channel_id, user = user.toDomain(currentUserId), message = message?.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), + channelLastMessageAt = channel_last_message_at, ) } @@ -280,6 +285,7 @@ private fun ChannelVisibleEventDto.toDomain(currentUserId: UserId?): ChannelVisi channelType = channel_type, channelId = channel_id, user = user.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -302,6 +308,7 @@ private fun MemberAddedEventDto.toDomain(currentUserId: UserId?): MemberAddedEve channelType = channel_type, channelId = channel_id, member = member.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -315,6 +322,7 @@ private fun MemberRemovedEventDto.toDomain(currentUserId: UserId?): MemberRemove channelType = channel_type, channelId = channel_id, member = member.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -328,6 +336,7 @@ private fun MemberUpdatedEventDto.toDomain(currentUserId: UserId?): MemberUpdate channelType = channel_type, channelId = channel_id, member = member.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -343,6 +352,7 @@ private fun MessageDeletedEventDto.toDomain(currentUserId: UserId?): MessageDele channelId = channel_id, message = message.toDomain(currentUserId), hardDelete = hard_delete ?: false, + channelLastMessageAt = channel_last_message_at, ) } @@ -356,6 +366,7 @@ private fun MessageReadEventDto.toDomain(currentUserId: UserId?): MessageReadEve channelType = channel_type, channelId = channel_id, thread = thread?.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -369,6 +380,7 @@ private fun MessageUpdatedEventDto.toDomain(currentUserId: UserId?): MessageUpda channelType = channel_type, channelId = channel_id, message = message.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -385,6 +397,7 @@ private fun NewMessageEventDto.toDomain(currentUserId: UserId?): NewMessageEvent watcherCount = watcher_count, totalUnreadCount = total_unread_count, unreadChannels = unread_channels, + channelLastMessageAt = channel_last_message_at, ) } @@ -396,10 +409,11 @@ private fun NotificationAddedToChannelEventDto.toDomain(currentUserId: UserId?): cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), member = member.toDomain(currentUserId), totalUnreadCount = total_unread_count, unreadChannels = unread_channels, + channelLastMessageAt = channel_last_message_at, ) } @@ -411,9 +425,10 @@ private fun NotificationChannelDeletedEventDto.toDomain(currentUserId: UserId?): cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), totalUnreadCount = total_unread_count, unreadChannels = unread_channels, + channelLastMessageAt = channel_last_message_at, ) } @@ -436,9 +451,10 @@ private fun NotificationChannelTruncatedEventDto.toDomain(currentUserId: UserId? cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), totalUnreadCount = total_unread_count, unreadChannels = unread_channels, + channelLastMessageAt = channel_last_message_at, ) } @@ -452,7 +468,8 @@ private fun NotificationInviteAcceptedEventDto.toDomain(currentUserId: UserId?): channelId = channel_id, user = user.toDomain(currentUserId), member = member.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), + channelLastMessageAt = channel_last_message_at, ) } @@ -466,7 +483,8 @@ private fun NotificationInviteRejectedEventDto.toDomain(currentUserId: UserId?): channelId = channel_id, user = user.toDomain(currentUserId), member = member.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), + channelLastMessageAt = channel_last_message_at, ) } @@ -480,6 +498,7 @@ private fun NotificationInvitedEventDto.toDomain(currentUserId: UserId?): Notifi channelId = channel_id, user = user.toDomain(currentUserId), member = member.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -498,6 +517,7 @@ private fun NotificationMarkReadEventDto.toDomain(currentUserId: UserId?): Notif thread = thread?.toDomain(currentUserId), unreadThreads = unread_threads, unreadThreadMessages = unread_thread_messages, + channelLastMessageAt = channel_last_message_at, ) } @@ -518,6 +538,7 @@ private fun NotificationMarkUnreadEventDto.toDomain(currentUserId: UserId?): Not unreadMessages = unread_messages, threadId = thread_id, unreadThreads = unread_threads, + channelLastMessageAt = channel_last_message_at, ) } @@ -540,10 +561,11 @@ private fun NotificationMessageNewEventDto.toDomain(currentUserId: UserId?): Not cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), message = message.toDomain(currentUserId), totalUnreadCount = total_unread_count, unreadChannels = unread_channels, + channelLastMessageAt = channel_last_message_at, ) } @@ -554,11 +576,12 @@ private fun NotificationThreadMessageNewEventDto.toDomain(currentUserId: UserId? channelId = channel_id, channelType = channel_type, message = message.toDomain(currentUserId), - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), createdAt = created_at.date, rawCreatedAt = created_at.rawDate, unreadThreads = unread_threads, unreadThreadMessages = unread_thread_messages, + channelLastMessageAt = channel_last_message_at, ) } @@ -582,8 +605,9 @@ private fun NotificationRemovedFromChannelEventDto.toDomain( cid = cid, channelType = channel_type, channelId = channel_id, - channel = channel.toDomain(currentUserId), + channel = channel.toDomain(currentUserId, channel_last_message_at), member = member.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -598,6 +622,7 @@ private fun ReactionDeletedEventDto.toDomain(currentUserId: UserId?): ReactionDe channelId = channel_id, message = message.toDomain(currentUserId), reaction = reaction.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -612,6 +637,7 @@ private fun ReactionNewEventDto.toDomain(currentUserId: UserId?): ReactionNewEve channelId = channel_id, message = message.toDomain(currentUserId), reaction = reaction.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -626,6 +652,7 @@ private fun ReactionUpdateEventDto.toDomain(currentUserId: UserId?): ReactionUpd channelId = channel_id, message = message.toDomain(currentUserId), reaction = reaction.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -639,6 +666,7 @@ private fun TypingStartEventDto.toDomain(currentUserId: UserId?): TypingStartEve channelType = channel_type, channelId = channel_id, parentId = parent_id, + channelLastMessageAt = channel_last_message_at, ) } @@ -652,6 +680,7 @@ private fun TypingStopEventDto.toDomain(currentUserId: UserId?): TypingStopEvent channelType = channel_type, channelId = channel_id, parentId = parent_id, + channelLastMessageAt = channel_last_message_at, ) } @@ -666,6 +695,7 @@ private fun ChannelUserBannedEventDto.toDomain(currentUserId: UserId?): ChannelU user = user.toDomain(currentUserId), expiration = expiration, shadow = shadow ?: false, + channelLastMessageAt = channel_last_message_at, ) } @@ -706,6 +736,7 @@ private fun UserStartWatchingEventDto.toDomain(currentUserId: UserId?): UserStar channelType = channel_type, channelId = channel_id, user = user.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -719,6 +750,7 @@ private fun UserStopWatchingEventDto.toDomain(currentUserId: UserId?): UserStopW channelType = channel_type, channelId = channel_id, user = user.toDomain(currentUserId), + channelLastMessageAt = channel_last_message_at, ) } @@ -731,6 +763,7 @@ private fun ChannelUserUnbannedEventDto.toDomain(currentUserId: UserId?): Channe cid = cid, channelType = channel_type, channelId = channel_id, + channelLastMessageAt = channel_last_message_at, ) } @@ -763,6 +796,7 @@ private fun PollClosedEventDto.toDomain(currentUserId: UserId?): PollClosedEvent channelType = channelType, channelId = channelId, poll = newPoll, + channelLastMessageAt = channel_last_message_at, ) } @@ -777,6 +811,7 @@ private fun PollDeletedEventDto.toDomain(currentUserId: UserId?): PollDeletedEve channelType = channelType, channelId = channelId, poll = newPoll, + channelLastMessageAt = channel_last_message_at, ) } @@ -791,6 +826,7 @@ private fun PollUpdatedEventDto.toDomain(currentUserId: UserId?): PollUpdatedEve channelType = channelType, channelId = channelId, poll = newPoll, + channelLastMessageAt = channel_last_message_at, ) } @@ -816,6 +852,7 @@ private fun VoteCastedEventDto.toDomain(currentUserId: UserId?): VoteCastedEvent channelId = channelId, poll = newPoll, newVote = pollVote, + channelLastMessageAt = channel_last_message_at, ) } @@ -831,6 +868,7 @@ private fun AnswerCastedEventDto.toDomain(currentUserId: UserId?): AnswerCastedE channelId = channelId, poll = poll.toDomain(currentUserId), newAnswer = newAnswer, + channelLastMessageAt = channel_last_message_at, ) } @@ -856,6 +894,7 @@ private fun VoteChangedEventDto.toDomain(currentUserId: UserId?): VoteChangedEve channelId = channelId, poll = newPoll, newVote = pollVote, + channelLastMessageAt = channel_last_message_at, ) } @@ -872,6 +911,7 @@ private fun VoteRemovedEventDto.toDomain(currentUserId: UserId?): VoteRemovedEve channelId = channelId, poll = newPoll, removedVote = removedVote, + channelLastMessageAt = channel_last_message_at, ) } diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ThreadMapping.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ThreadMapping.kt index a1e24bd93c6..e3ace113bd9 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ThreadMapping.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/ThreadMapping.kt @@ -28,7 +28,7 @@ internal fun DownstreamThreadDto.toDomain(currentUserId: UserId?): Thread = Thread( activeParticipantCount = active_participant_count ?: 0, cid = channel_cid, - channel = channel?.toDomain(currentUserId), + channel = channel?.toDomain(currentUserId, null), parentMessageId = parent_message_id, parentMessage = parent_message.toDomain(currentUserId), createdByUserId = created_by_user_id, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ConfigDto.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ConfigDto.kt index 1cd3dfd4ee3..30e657ec7b9 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ConfigDto.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/ConfigDto.kt @@ -35,6 +35,7 @@ internal data class ConfigDto( val url_enrichment: Boolean, val custom_events: Boolean, val push_notifications: Boolean, + val skip_last_msg_update_for_system_msgs: Boolean?, val polls: Boolean, val message_retention: String, val max_message_length: Int, diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/EventDtos.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/EventDtos.kt index 05deef94d6f..8ebc347bb6e 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/EventDtos.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/model/dto/EventDtos.kt @@ -32,6 +32,7 @@ internal data class ChannelDeletedEventDto( val channel_id: String, val channel: DownstreamChannelDto, val user: DownstreamUserDto?, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -43,6 +44,7 @@ internal data class ChannelHiddenEventDto( val channel_id: String, val user: DownstreamUserDto, val clear_history: Boolean, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -55,6 +57,7 @@ internal data class ChannelTruncatedEventDto( val user: DownstreamUserDto?, val message: DownstreamMessageDto?, val channel: DownstreamChannelDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -66,6 +69,7 @@ internal data class ChannelUpdatedEventDto( val channel_id: String, val message: DownstreamMessageDto?, val channel: DownstreamChannelDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -78,6 +82,7 @@ internal data class ChannelUpdatedByUserEventDto( val user: DownstreamUserDto, val message: DownstreamMessageDto?, val channel: DownstreamChannelDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -88,6 +93,7 @@ internal data class ChannelVisibleEventDto( val channel_type: String, val channel_id: String, val user: DownstreamUserDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -106,6 +112,7 @@ internal data class MemberAddedEventDto( val channel_type: String, val channel_id: String, val member: DownstreamMemberDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -117,6 +124,7 @@ internal data class MemberRemovedEventDto( val channel_type: String, val channel_id: String, val member: DownstreamMemberDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -128,6 +136,7 @@ internal data class MemberUpdatedEventDto( val channel_type: String, val channel_id: String, val member: DownstreamMemberDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -140,6 +149,7 @@ internal data class MessageDeletedEventDto( val channel_id: String, val message: DownstreamMessageDto, val hard_delete: Boolean?, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -151,6 +161,7 @@ internal data class MessageReadEventDto( val channel_type: String, val channel_id: String, val thread: DownstreamThreadInfoDto? = null, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -162,6 +173,7 @@ internal data class MessageUpdatedEventDto( val channel_type: String, val channel_id: String, val message: DownstreamMessageDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -176,6 +188,7 @@ internal data class NewMessageEventDto( val watcher_count: Int = 0, val total_unread_count: Int = 0, val unread_channels: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -189,6 +202,7 @@ internal data class NotificationAddedToChannelEventDto( val member: DownstreamMemberDto, val total_unread_count: Int = 0, val unread_channels: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -201,6 +215,7 @@ internal data class NotificationChannelDeletedEventDto( val channel: DownstreamChannelDto, val total_unread_count: Int = 0, val unread_channels: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -220,6 +235,7 @@ internal data class NotificationChannelTruncatedEventDto( val channel: DownstreamChannelDto, val total_unread_count: Int = 0, val unread_channels: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -232,6 +248,7 @@ internal data class NotificationInviteAcceptedEventDto( val user: DownstreamUserDto, val member: DownstreamMemberDto, val channel: DownstreamChannelDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -244,6 +261,7 @@ internal data class NotificationInviteRejectedEventDto( val user: DownstreamUserDto, val member: DownstreamMemberDto, val channel: DownstreamChannelDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -255,6 +273,7 @@ internal data class NotificationInvitedEventDto( val channel_id: String, val user: DownstreamUserDto, val member: DownstreamMemberDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -271,6 +290,7 @@ internal data class NotificationMarkReadEventDto( val thread: DownstreamThreadInfoDto? = null, val unread_threads: Int? = null, val unread_thread_messages: Int? = null, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -289,6 +309,7 @@ internal data class NotificationMarkUnreadEventDto( val unread_channels: Int, val thread_id: String? = null, val unread_threads: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -311,6 +332,7 @@ internal data class NotificationMessageNewEventDto( val message: DownstreamMessageDto, val total_unread_count: Int = 0, val unread_channels: Int = 0, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -324,6 +346,7 @@ internal data class NotificationThreadMessageNewEventDto( val created_at: ExactDate, val unread_threads: Int, val unread_thread_messages: Int, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -343,6 +366,7 @@ internal data class NotificationRemovedFromChannelEventDto( val channel_id: String, val channel: DownstreamChannelDto, val member: DownstreamMemberDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -355,6 +379,7 @@ internal data class ReactionDeletedEventDto( val channel_id: String, val message: DownstreamMessageDto, val reaction: DownstreamReactionDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -367,6 +392,7 @@ internal data class ReactionNewEventDto( val channel_id: String, val message: DownstreamMessageDto, val reaction: DownstreamReactionDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -379,6 +405,7 @@ internal data class ReactionUpdateEventDto( val channel_id: String, val message: DownstreamMessageDto, val reaction: DownstreamReactionDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -390,6 +417,7 @@ internal data class TypingStartEventDto( val channel_type: String, val channel_id: String, val parent_id: String?, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -401,6 +429,7 @@ internal data class TypingStopEventDto( val channel_type: String, val channel_id: String, val parent_id: String?, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -413,6 +442,7 @@ internal data class ChannelUserBannedEventDto( val user: DownstreamUserDto, val expiration: Date?, val shadow: Boolean?, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -445,6 +475,7 @@ internal data class UserStartWatchingEventDto( val channel_type: String, val channel_id: String, val user: DownstreamUserDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -456,6 +487,7 @@ internal data class UserStopWatchingEventDto( val channel_type: String, val channel_id: String, val user: DownstreamUserDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -466,6 +498,7 @@ internal data class ChannelUserUnbannedEventDto( val cid: String, val channel_type: String, val channel_id: String, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -488,6 +521,7 @@ internal data class PollUpdatedEventDto( val cid: String, val poll: DownstreamPollDto, val created_at: ExactDate, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -496,6 +530,7 @@ internal data class PollDeletedEventDto( val cid: String, val created_at: ExactDate, val poll: DownstreamPollDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -504,6 +539,7 @@ internal data class PollClosedEventDto( val cid: String, val created_at: ExactDate, val poll: DownstreamPollDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -513,6 +549,7 @@ internal data class VoteCastedEventDto( val created_at: ExactDate, val poll: DownstreamPollDto, val poll_vote: DownstreamVoteDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -522,6 +559,7 @@ internal data class AnswerCastedEventDto( val created_at: ExactDate, val poll: DownstreamPollDto, val poll_vote: DownstreamVoteDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -531,6 +569,7 @@ internal data class VoteChangedEventDto( val poll: DownstreamPollDto, val created_at: ExactDate, val poll_vote: DownstreamVoteDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) @@ -540,6 +579,7 @@ internal data class VoteRemovedEventDto( val poll: DownstreamPollDto, val created_at: ExactDate, val poll_vote: DownstreamVoteDto, + val channel_last_message_at: Date?, ) : ChatEventDto() @JsonClass(generateAdapter = true) diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/events/ChatEvent.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/events/ChatEvent.kt index 9fd21070f9f..d436cbed429 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/events/ChatEvent.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/events/ChatEvent.kt @@ -45,6 +45,7 @@ public sealed class CidEvent : ChatEvent() { public abstract val cid: String public abstract val channelType: String public abstract val channelId: String + public abstract val channelLastMessageAt: Date? } public sealed interface UserEvent { @@ -127,6 +128,7 @@ public data class ChannelDeletedEvent( override val channelType: String, override val channelId: String, override val channel: Channel, + override val channelLastMessageAt: Date?, val user: User?, ) : CidEvent(), HasChannel @@ -141,6 +143,7 @@ public data class ChannelHiddenEvent( override val channelType: String, override val channelId: String, override val user: User, + override val channelLastMessageAt: Date?, val clearHistory: Boolean, ) : CidEvent(), UserEvent @@ -154,9 +157,10 @@ public data class ChannelTruncatedEvent( override val cid: String, override val channelType: String, override val channelId: String, + override val channel: Channel, + override val channelLastMessageAt: Date?, val user: User?, val message: Message?, - override val channel: Channel, ) : CidEvent(), HasChannel /** @@ -169,8 +173,9 @@ public data class ChannelUpdatedEvent( override val cid: String, override val channelType: String, override val channelId: String, - val message: Message?, override val channel: Channel, + override val channelLastMessageAt: Date?, + val message: Message?, ) : CidEvent(), HasChannel /** @@ -184,8 +189,9 @@ public data class ChannelUpdatedByUserEvent( override val channelType: String, override val channelId: String, override val user: User, - val message: Message?, override val channel: Channel, + override val channelLastMessageAt: Date?, + val message: Message?, ) : CidEvent(), UserEvent, HasChannel /** @@ -199,6 +205,7 @@ public data class ChannelVisibleEvent( override val channelType: String, override val channelId: String, override val user: User, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent /** @@ -223,6 +230,7 @@ public data class MemberAddedEvent( override val channelType: String, override val channelId: String, override val member: Member, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember /** @@ -237,6 +245,7 @@ public data class MemberRemovedEvent( override val channelType: String, override val channelId: String, override val member: Member, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember /** @@ -251,6 +260,7 @@ public data class MemberUpdatedEvent( override val channelType: String, override val channelId: String, override val member: Member, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember /** @@ -260,11 +270,12 @@ public data class MessageDeletedEvent( override val type: String, override val createdAt: Date, override val rawCreatedAt: String, - val user: User?, override val cid: String, override val channelType: String, override val channelId: String, override val message: Message, + override val channelLastMessageAt: Date?, + val user: User?, val hardDelete: Boolean, ) : CidEvent(), HasMessage @@ -279,6 +290,7 @@ public data class MessageReadEvent( override val cid: String, override val channelType: String, override val channelId: String, + override val channelLastMessageAt: Date?, val thread: ThreadInfo? = null, ) : CidEvent(), UserEvent @@ -294,6 +306,7 @@ public data class MessageUpdatedEvent( override val channelType: String, override val channelId: String, override val message: Message, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMessage /** @@ -311,6 +324,7 @@ public data class NewMessageEvent( override val watcherCount: Int = 0, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMessage, HasWatcherCount, HasUnreadCounts /** @@ -327,6 +341,7 @@ public data class NotificationAddedToChannelEvent( override val member: Member, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasChannel, HasMember, HasUnreadCounts /** @@ -342,6 +357,7 @@ public data class NotificationChannelDeletedEvent( override val channel: Channel, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasChannel, HasUnreadCounts /** @@ -367,6 +383,7 @@ public data class NotificationChannelTruncatedEvent( override val channel: Channel, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasChannel, HasUnreadCounts /** @@ -382,6 +399,7 @@ public data class NotificationInviteAcceptedEvent( override val user: User, override val member: Member, override val channel: Channel, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember, HasChannel /** @@ -397,6 +415,7 @@ public data class NotificationInviteRejectedEvent( override val user: User, override val member: Member, override val channel: Channel, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember, HasChannel /** @@ -411,6 +430,7 @@ public data class NotificationInvitedEvent( override val channelId: String, override val user: User, override val member: Member, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMember /** @@ -426,6 +446,7 @@ public data class NotificationMarkReadEvent( override val channelId: String, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, val threadId: String? = null, val thread: ThreadInfo? = null, val unreadThreads: Int? = null, @@ -445,6 +466,7 @@ public data class NotificationMarkUnreadEvent( override val channelId: String, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, val unreadMessages: Int, val firstUnreadMessageId: String, val lastReadMessageAt: Date, @@ -479,6 +501,7 @@ public data class NotificationMessageNewEvent( override val message: Message, override val totalUnreadCount: Int = 0, override val unreadChannels: Int = 0, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasChannel, HasMessage, HasUnreadCounts /** @@ -495,6 +518,7 @@ public data class NotificationThreadMessageNewEvent( override val rawCreatedAt: String?, override val unreadThreads: Int, override val unreadThreadMessages: Int, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasMessage, HasChannel, HasUnreadThreadCounts /** @@ -514,12 +538,13 @@ public data class NotificationRemovedFromChannelEvent( override val type: String, override val createdAt: Date, override val rawCreatedAt: String, - val user: User?, + override val channelLastMessageAt: Date?, override val cid: String, override val channelType: String, override val channelId: String, override val channel: Channel, override val member: Member, + val user: User?, ) : CidEvent(), HasMember, HasChannel /** @@ -535,6 +560,7 @@ public data class ReactionDeletedEvent( override val channelId: String, override val message: Message, override val reaction: Reaction, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMessage, HasReaction /** @@ -550,6 +576,7 @@ public data class ReactionNewEvent( override val channelId: String, override val message: Message, override val reaction: Reaction, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMessage, HasReaction /** @@ -565,6 +592,7 @@ public data class ReactionUpdateEvent( override val channelId: String, override val message: Message, override val reaction: Reaction, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasMessage, HasReaction /** @@ -578,6 +606,7 @@ public data class TypingStartEvent( override val cid: String, override val channelType: String, override val channelId: String, + override val channelLastMessageAt: Date?, val parentId: String?, ) : CidEvent(), UserEvent @@ -592,6 +621,7 @@ public data class TypingStopEvent( override val cid: String, override val channelType: String, override val channelId: String, + override val channelLastMessageAt: Date?, val parentId: String?, ) : CidEvent(), UserEvent @@ -606,6 +636,7 @@ public data class ChannelUserBannedEvent( override val channelType: String, override val channelId: String, override val user: User, + override val channelLastMessageAt: Date?, val expiration: Date?, val shadow: Boolean, ) : CidEvent(), UserEvent @@ -649,6 +680,7 @@ public data class UserStartWatchingEvent( override val channelType: String, override val channelId: String, override val user: User, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasWatcherCount /** @@ -663,6 +695,7 @@ public data class UserStopWatchingEvent( override val channelType: String, override val channelId: String, override val user: User, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent, HasWatcherCount /** @@ -676,6 +709,7 @@ public data class ChannelUserUnbannedEvent( override val cid: String, override val channelType: String, override val channelId: String, + override val channelLastMessageAt: Date?, ) : CidEvent(), UserEvent /** @@ -709,6 +743,7 @@ public data class PollUpdatedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasPoll /** @@ -722,6 +757,7 @@ public data class PollDeletedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasPoll /** @@ -735,6 +771,7 @@ public data class PollClosedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, ) : CidEvent(), HasPoll /** @@ -748,6 +785,7 @@ public data class VoteCastedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, val newVote: Vote, ) : CidEvent(), HasPoll @@ -762,6 +800,7 @@ public data class AnswerCastedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, val newAnswer: Answer, ) : CidEvent(), HasPoll @@ -776,6 +815,7 @@ public data class VoteChangedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, val newVote: Vote, ) : CidEvent(), HasPoll @@ -790,6 +830,7 @@ public data class VoteRemovedEvent( override val channelType: String, override val channelId: String, override val poll: Poll, + override val channelLastMessageAt: Date?, val removedVote: Vote, ) : CidEvent(), HasPoll diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/extensions/internal/Channel.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/extensions/internal/Channel.kt index a32f314716c..ce5d97d6aae 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/extensions/internal/Channel.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/extensions/internal/Channel.kt @@ -80,10 +80,6 @@ public fun Channel.updateLastMessage( ) } return this.copy( - lastMessageAt = newMessages - .filterNot { it.parentId != null && !it.showInChannel } - .last() - .let { it.createdAt ?: it.createdLocallyAt }, messages = newMessages, read = newReads, ).syncUnreadCountWithReads() diff --git a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/EventChatJsonProvider.kt b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/EventChatJsonProvider.kt index 6c0b4f2fb26..f5f5b473267 100644 --- a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/EventChatJsonProvider.kt +++ b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/EventChatJsonProvider.kt @@ -26,7 +26,8 @@ internal fun createChannelDeletedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -38,7 +39,8 @@ internal fun createChannelHiddenEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "clear_history": true + "clear_history": true, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -50,7 +52,8 @@ internal fun createChannelTruncatedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -61,7 +64,8 @@ internal fun createChannelTruncatedServerSideEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -73,7 +77,8 @@ internal fun createChannelUpdatedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "message": ${createMessageJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -86,7 +91,8 @@ internal fun createChannelUpdatedByUserEventStringJson() = "cid": "channelType:channelId", "user": ${createUserJsonString()}, "message": ${createMessageJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -97,7 +103,8 @@ internal fun createChannelVisibleEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "user": ${createUserJsonString()} + "user": ${createUserJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -109,7 +116,8 @@ internal fun createMemberAddedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "member": ${createMemberJsonString()} + "member": ${createMemberJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -121,7 +129,8 @@ internal fun createMemberRemovedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "member": ${createMemberJsonString()} + "member": ${createMemberJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -133,7 +142,8 @@ internal fun createMemberUpdatedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "member": ${createMemberJsonString()} + "member": ${createMemberJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -146,7 +156,8 @@ internal fun createMessageDeletedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "watcher_count": 3, - "message": ${createMessageJsonString()} + "message": ${createMessageJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -158,7 +169,8 @@ internal fun createMessageDeletedServerSideEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "message": ${createMessageJsonString()}, - "hard_delete": true + "hard_delete": true, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -170,7 +182,8 @@ internal fun createMessageReadEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "watcher_count": 3 + "watcher_count": 3, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -183,7 +196,8 @@ internal fun createMessageUpdatedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "watcher_count": 3, - "message": ${createMessageJsonString()} + "message": ${createMessageJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -197,7 +211,8 @@ internal fun createNotificationAddedToChannelEventStringJson() = "channel": ${createChannelJsonString()}, "member": ${createMemberJsonString()}, "total_unread_count": 4, - "unread_channels": 5 + "unread_channels": 5, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -209,7 +224,8 @@ internal fun createNotificationChannelDeletedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -221,7 +237,8 @@ internal fun createNotificationChannelTruncatedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -234,7 +251,8 @@ internal fun createNotificationInviteAcceptedEventStringJson() = "cid": "channelType:channelId", "user": ${createUserJsonString()}, "member": ${createMemberJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -247,7 +265,8 @@ internal fun createNotificationInviteRejectedEventStringJson() = "cid": "channelType:channelId", "user": ${createUserJsonString()}, "member": ${createMemberJsonString()}, - "channel": ${createChannelJsonString()} + "channel": ${createChannelJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -259,7 +278,8 @@ internal fun createNotificationInvitedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "user": ${createUserJsonString()}, - "member": ${createMemberJsonString()} + "member": ${createMemberJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -273,7 +293,8 @@ internal fun createNotificationMarkReadEventStringJson() = "user": ${createUserJsonString()}, "watcher_count": 3, "total_unread_count": 4, - "unread_channels": 5 + "unread_channels": 5, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -291,7 +312,8 @@ internal fun createNotificationMarkUnreadEventStringJson() = "unread_messages": 1, "first_unread_message_id": "09afcd85-9dbb-4da8-8d85-5a6b4268d755", "last_read_at": "2020-06-29T06:14:28.000Z", - "last_read_message_id": "parentMessageId" + "last_read_message_id": "parentMessageId", + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -307,7 +329,8 @@ internal fun createNotificationMessageNewEventStringJson() = "watcher_count": 3, "total_unread_count": 4, "unread_channels": 5, - "message": ${createMessageJsonString()} + "message": ${createMessageJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -320,7 +343,8 @@ internal fun createNotificationRemovedFromChannelEventStringJson() = "cid": "channelType:channelId", "channel": ${createChannelJsonString()}, "user": ${createUserJsonString()}, - "member": ${createMemberJsonString()} + "member": ${createMemberJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -333,7 +357,8 @@ internal fun createReactionDeletedEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "message": ${createMessageJsonString()}, - "reaction": ${createReactionJsonString()} + "reaction": ${createReactionJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -346,7 +371,8 @@ internal fun createReactionNewEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "message": ${createMessageJsonString()}, - "reaction": ${createReactionJsonString()} + "reaction": ${createReactionJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -359,7 +385,8 @@ internal fun createReactionUpdateEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "message": ${createMessageJsonString()}, - "reaction": ${createReactionJsonString()} + "reaction": ${createReactionJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -371,7 +398,8 @@ internal fun createTypingStartEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "parent_id": "parentMessageId" + "parent_id": "parentMessageId", + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -383,7 +411,8 @@ internal fun createTypingStopEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "parent_id": "parentMessageId" + "parent_id": "parentMessageId", + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -395,7 +424,8 @@ internal fun createChannelUserBannedEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "expiration": "2020-06-29T06:14:28.000Z" + "expiration": "2020-06-29T06:14:28.000Z", + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -431,7 +461,8 @@ internal fun createUserStartWatchingEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "watcher_count": 3 + "watcher_count": 3, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -443,7 +474,8 @@ internal fun createUserStopWatchingEventStringJson() = "channel_type": "channelType", "channel_id": "channelId", "cid": "channelType:channelId", - "watcher_count": 3 + "watcher_count": 3, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -454,7 +486,8 @@ internal fun createChannelUserUnbannedEventStringJson() = "user": ${createUserJsonString()}, "channel_type": "channelType", "channel_id": "channelId", - "cid": "channelType:channelId" + "cid": "channelType:channelId", + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -518,7 +551,8 @@ internal fun createNewMessageEventStringJson() = "watcher_count": 3, "total_unread_count": 4, "unread_channels": 5, - "message": ${createMessageJsonString()} + "message": ${createMessageJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -531,7 +565,8 @@ internal fun createNewMessageWithoutUnreadCountsEventStringJson() = "channel_id": "channelId", "cid": "channelType:channelId", "watcher_count": 3, - "message": ${createMessageJsonString()} + "message": ${createMessageJsonString()}, + "channel_last_message_at": "2020-06-29T06:14:28.000Z" """.trimIndent(), ) @@ -642,6 +677,7 @@ private fun createConfigJsonString() = "url_enrichment":true, "custom_events": true, "push_notifications":true, + "skip_last_msg_update_for_system_msgs": false, "message_retention": "infinite", "max_message_length": 5000, "polls": false, diff --git a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/channel/ChannelClientSubscribeTest.kt b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/channel/ChannelClientSubscribeTest.kt index e2e147e3f82..61207793fb6 100644 --- a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/channel/ChannelClientSubscribeTest.kt +++ b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/channel/ChannelClientSubscribeTest.kt @@ -52,27 +52,29 @@ internal class ChannelClientSubscribeTest { val NON_CHANNEL_EVENT = ConnectedEvent(EventType.HEALTH_CHECK, createdAt, rawCreatedAt, User(), "") val CHANNEL_EVENT = ChannelUpdatedEvent( - EventType.CHANNEL_UPDATED, - createdAt, - rawCreatedAt, - CID, - CHANNEL_TYPE, - CHANNEL_ID, - null, - Channel(), + type = EventType.CHANNEL_UPDATED, + createdAt = createdAt, + rawCreatedAt = rawCreatedAt, + cid = CID, + channelType = CHANNEL_TYPE, + channelId = CHANNEL_ID, + channel = Channel(), + channelLastMessageAt = Date(), + message = null, ) val OTHER_CHANNEL_EVENT = NewMessageEvent( - EventType.MESSAGE_NEW, - createdAt, - rawCreatedAt, - User(), - OTHER_CID, - OTHER_CHANNEL_TYPE, - OTHER_CHANNEL_ID, - Message(), - 0, - 0, - 0, + type = EventType.MESSAGE_NEW, + createdAt = createdAt, + rawCreatedAt = rawCreatedAt, + user = User(), + cid = OTHER_CID, + channelType = OTHER_CHANNEL_TYPE, + channelId = OTHER_CHANNEL_ID, + message = Message(), + watcherCount = 0, + totalUnreadCount = 0, + unreadChannels = 0, + channelLastMessageAt = Date(), ) } diff --git a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser/EventArguments.kt b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser/EventArguments.kt index 3949c7c36f0..424f6991975 100644 --- a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser/EventArguments.kt +++ b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser/EventArguments.kt @@ -188,7 +188,7 @@ internal object EventArguments { private val channel = Channel( id = channelId, type = channelType, - lastMessageAt = date, + channelLastMessageAt = date, createdAt = date, updatedAt = date, createdBy = user, @@ -226,6 +226,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, channel = channel, + channelLastMessageAt = date, user = user, ) @@ -237,6 +238,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = date, clearHistory = true, ) @@ -247,9 +249,10 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, + channel = channel, + channelLastMessageAt = date, user = user, message = null, - channel = channel, ) private val channelTruncatedServerSideEvent = ChannelTruncatedEvent( type = EventType.CHANNEL_TRUNCATED, @@ -258,9 +261,10 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, + channel = channel, + channelLastMessageAt = date, user = null, message = null, - channel = channel, ) private val channelUpdatedEvent = ChannelUpdatedEvent( type = EventType.CHANNEL_UPDATED, @@ -271,6 +275,7 @@ internal object EventArguments { channelId = channelId, message = message, channel = channel, + channelLastMessageAt = date, ) private val channelUpdatedByUserEvent = ChannelUpdatedByUserEvent( type = EventType.CHANNEL_UPDATED, @@ -280,8 +285,9 @@ internal object EventArguments { channelType = channelType, channelId = channelId, user = user, - message = message, channel = channel, + channelLastMessageAt = date, + message = message, ) private val channelVisibleEvent = ChannelVisibleEvent( type = EventType.CHANNEL_VISIBLE, @@ -291,6 +297,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = date, ) private val memberAddedEvent = MemberAddedEvent( type = EventType.MEMBER_ADDED, @@ -301,6 +308,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, member = member, + channelLastMessageAt = date, ) private val memberRemovedEvent = MemberRemovedEvent( type = EventType.MEMBER_REMOVED, @@ -311,6 +319,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, member = member, + channelLastMessageAt = date, ) private val memberUpdatedEvent = MemberUpdatedEvent( type = EventType.MEMBER_UPDATED, @@ -321,6 +330,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, member = member, + channelLastMessageAt = date, ) private val messageDeletedEvent = MessageDeletedEvent( type = EventType.MESSAGE_DELETED, @@ -330,7 +340,9 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, - message = message, hardDelete = false, + message = message, + hardDelete = false, + channelLastMessageAt = date, ) private val messageDeletedServerSideEvent = MessageDeletedEvent( type = EventType.MESSAGE_DELETED, @@ -340,7 +352,9 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, - message = message, hardDelete = true, + message = message, + hardDelete = true, + channelLastMessageAt = date, ) private val messageReadEvent = MessageReadEvent( type = EventType.MESSAGE_READ, @@ -350,6 +364,7 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, + channelLastMessageAt = date, ) private val messageUpdatedEvent = MessageUpdatedEvent( type = EventType.MESSAGE_UPDATED, @@ -360,6 +375,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, message = message, + channelLastMessageAt = date, ) private val notificationAddedToChannelEvent = NotificationAddedToChannelEvent( type = EventType.NOTIFICATION_ADDED_TO_CHANNEL, @@ -372,6 +388,7 @@ internal object EventArguments { member = member, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = date, ) private val notificationChannelDeletedEvent = NotificationChannelDeletedEvent( type = EventType.NOTIFICATION_CHANNEL_DELETED, @@ -381,6 +398,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, channel = channel, + channelLastMessageAt = date, ) private val notificationChannelTruncatedEvent = NotificationChannelTruncatedEvent( type = EventType.NOTIFICATION_CHANNEL_TRUNCATED, @@ -390,6 +408,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, channel = channel, + channelLastMessageAt = date, ) private val notificationInviteAcceptedEvent = NotificationInviteAcceptedEvent( type = EventType.NOTIFICATION_INVITE_ACCEPTED, @@ -401,6 +420,7 @@ internal object EventArguments { user = user, member = member, channel = channel, + channelLastMessageAt = date, ) private val notificationInviteRejectedEvent = NotificationInviteRejectedEvent( type = EventType.NOTIFICATION_INVITE_REJECTED, @@ -412,6 +432,7 @@ internal object EventArguments { user = user, member = member, channel = channel, + channelLastMessageAt = date, ) private val notificationInvitedEvent = NotificationInvitedEvent( type = EventType.NOTIFICATION_INVITED, @@ -422,6 +443,7 @@ internal object EventArguments { channelId = channelId, user = user, member = member, + channelLastMessageAt = date, ) private val notificationMarkReadEvent = NotificationMarkReadEvent( type = EventType.NOTIFICATION_MARK_READ, @@ -433,6 +455,7 @@ internal object EventArguments { channelId = channelId, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = date, ) private val notificationMarkUnreadEvent = NotificationMarkUnreadEvent( type = EventType.NOTIFICATION_MARK_UNREAD, @@ -448,6 +471,7 @@ internal object EventArguments { firstUnreadMessageId = message.id, lastReadMessageAt = date, lastReadMessageId = parentMessageId, + channelLastMessageAt = date, ) private val notificationMessageNewEvent = NotificationMessageNewEvent( type = EventType.NOTIFICATION_MESSAGE_NEW, @@ -460,6 +484,7 @@ internal object EventArguments { message = message, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = date, ) private val notificationRemovedFromChannelEvent = NotificationRemovedFromChannelEvent( type = EventType.NOTIFICATION_REMOVED_FROM_CHANNEL, @@ -471,6 +496,7 @@ internal object EventArguments { channelId = channelId, channel = channel, member = member, + channelLastMessageAt = date, ) private val reactionDeletedEvent = ReactionDeletedEvent( type = EventType.REACTION_DELETED, @@ -482,6 +508,7 @@ internal object EventArguments { channelId = channelId, message = message, reaction = reaction, + channelLastMessageAt = date, ) private val reactionNewEvent = ReactionNewEvent( type = EventType.REACTION_NEW, @@ -493,6 +520,7 @@ internal object EventArguments { channelId = channelId, message = message, reaction = reaction, + channelLastMessageAt = date, ) private val reactionUpdateEvent = ReactionUpdateEvent( type = EventType.REACTION_UPDATED, @@ -504,6 +532,7 @@ internal object EventArguments { channelId = channelId, message = message, reaction = reaction, + channelLastMessageAt = date, ) private val typingStartEvent = TypingStartEvent( type = EventType.TYPING_START, @@ -514,6 +543,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, parentId = parentMessageId, + channelLastMessageAt = date, ) private val typingStopEvent = TypingStopEvent( type = EventType.TYPING_STOP, @@ -524,6 +554,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, parentId = parentMessageId, + channelLastMessageAt = date, ) private val channelUserBannedEvent = ChannelUserBannedEvent( type = EventType.USER_BANNED, @@ -535,6 +566,7 @@ internal object EventArguments { user = user, expiration = date, shadow = false, + channelLastMessageAt = date, ) private val globalUserBannedEvent = GlobalUserBannedEvent( type = EventType.USER_BANNED, @@ -563,6 +595,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = date, ) private val userStopWatchingEvent = UserStopWatchingEvent( type = EventType.USER_WATCHING_STOP, @@ -573,6 +606,7 @@ internal object EventArguments { channelType = channelType, channelId = channelId, user = user, + channelLastMessageAt = date, ) private val channelUserUnbannedEvent = ChannelUserUnbannedEvent( type = EventType.USER_UNBANNED, @@ -582,6 +616,7 @@ internal object EventArguments { cid = cid, channelType = channelType, channelId = channelId, + channelLastMessageAt = date, ) private val globalUserUnbannedEvent = GlobalUserUnbannedEvent( type = EventType.USER_UNBANNED, @@ -632,6 +667,7 @@ internal object EventArguments { watcherCount = watcherCount, totalUnreadCount = totalUnreadCount, unreadChannels = unreadChannels, + channelLastMessageAt = date, ) private val newMessageWithoutUnreadCountsEvent = NewMessageEvent( type = EventType.MESSAGE_NEW, @@ -643,6 +679,7 @@ internal object EventArguments { channelId = channelId, message = message, watcherCount = watcherCount, + channelLastMessageAt = date, ) private val unknownEvent = UnknownEvent( type = EventType.UNKNOWN, diff --git a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/testdata/ChannelDtoTestData.kt b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/testdata/ChannelDtoTestData.kt index ec088e73502..9d23c43080f 100644 --- a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/testdata/ChannelDtoTestData.kt +++ b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/parser2/testdata/ChannelDtoTestData.kt @@ -47,6 +47,7 @@ internal object ChannelDtoTestData { "url_enrichment": false, "custom_events": false, "push_notifications": true, + "skip_last_msg_update_for_system_msgs": false, "polls": true, "message_retention": "retention", "max_message_length": 500, @@ -79,6 +80,7 @@ internal object ChannelDtoTestData { url_enrichment = false, custom_events = false, push_notifications = true, + skip_last_msg_update_for_system_msgs = false, polls = true, message_retention = "retention", max_message_length = 500, diff --git a/stream-chat-android-compose-sample/src/e2e/java/io/getstream/chat/android/compose/sample/ui/StartupActivity.kt b/stream-chat-android-compose-sample/src/e2e/java/io/getstream/chat/android/compose/sample/ui/StartupActivity.kt index 0e251ae6e1f..7fc03ea9bc2 100644 --- a/stream-chat-android-compose-sample/src/e2e/java/io/getstream/chat/android/compose/sample/ui/StartupActivity.kt +++ b/stream-chat-android-compose-sample/src/e2e/java/io/getstream/chat/android/compose/sample/ui/StartupActivity.kt @@ -28,7 +28,6 @@ class StartupActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - println("JcLog: baseUri: ${intent.getStringExtra("BASE_URL")}") ChatHelper.initializeSdk(applicationContext, PredefinedUserCredentials.API_KEY, intent.getStringExtra("BASE_URL")) startActivity(UserLoginActivity.createIntent(this@StartupActivity)) finish() diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt index 82afff2233a..84cd9eaa5bb 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelItem.kt @@ -309,7 +309,7 @@ internal fun RowScope.DefaultChannelItemTrailingContent( ) } - Timestamp(date = channel.lastUpdated) + Timestamp(date = channel.lastMessageAt) } } } diff --git a/stream-chat-android-core/api/stream-chat-android-core.api b/stream-chat-android-core/api/stream-chat-android-core.api index 7ec24b6d180..cf90c925de9 100644 --- a/stream-chat-android-core/api/stream-chat-android-core.api +++ b/stream-chat-android-core/api/stream-chat-android-core.api @@ -354,29 +354,28 @@ public final class io/getstream/chat/android/models/BannedUsersSort : io/getstre public final class io/getstream/chat/android/models/Channel : io/getstream/chat/android/models/CustomObject, io/getstream/chat/android/models/querysort/ComparableFieldProvider { public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Map;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Date;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Date;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; - public final fun component10 ()Ljava/util/Date; - public final fun component11 ()Lio/getstream/chat/android/models/SyncStatus; - public final fun component12 ()I + public final fun component10 ()Lio/getstream/chat/android/models/SyncStatus; + public final fun component11 ()I + public final fun component12 ()Ljava/util/List; public final fun component13 ()Ljava/util/List; public final fun component14 ()Ljava/util/List; public final fun component15 ()Ljava/util/List; - public final fun component16 ()Ljava/util/List; - public final fun component17 ()Lio/getstream/chat/android/models/Config; - public final fun component18 ()Lio/getstream/chat/android/models/User; - public final fun component19 ()I + public final fun component16 ()Lio/getstream/chat/android/models/Config; + public final fun component17 ()Lio/getstream/chat/android/models/User; + public final fun component18 ()I + public final fun component19 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; - public final fun component20 ()Ljava/lang/String; - public final fun component21 ()Ljava/lang/Boolean; - public final fun component22 ()Ljava/util/Date; - public final fun component23 ()I - public final fun component24 ()Ljava/util/List; - public final fun component25 ()Ljava/util/Set; - public final fun component26 ()Lio/getstream/chat/android/models/Member; - public final fun component27 ()Ljava/util/List; - public final fun component28 ()Z + public final fun component20 ()Ljava/lang/Boolean; + public final fun component21 ()Ljava/util/Date; + public final fun component22 ()I + public final fun component23 ()Ljava/util/List; + public final fun component24 ()Ljava/util/Set; + public final fun component25 ()Lio/getstream/chat/android/models/Member; + public final fun component26 ()Ljava/util/List; + public final fun component27 ()Z public final fun component29 ()Ljava/util/Map; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -385,8 +384,8 @@ public final class io/getstream/chat/android/models/Channel : io/getstream/chat/ public final fun component7 ()Ljava/util/Date; public final fun component8 ()Ljava/util/Date; public final fun component9 ()Ljava/util/Date; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Map;)Lio/getstream/chat/android/models/Channel; - public static synthetic fun copy$default (Lio/getstream/chat/android/models/Channel;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Map;ILjava/lang/Object;)Lio/getstream/chat/android/models/Channel; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Date;Ljava/util/Map;)Lio/getstream/chat/android/models/Channel; + public static synthetic fun copy$default (Lio/getstream/chat/android/models/Channel;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/util/Date;Ljava/util/Date;Ljava/util/Date;Lio/getstream/chat/android/models/SyncStatus;ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lio/getstream/chat/android/models/Config;Lio/getstream/chat/android/models/User;ILjava/lang/String;Ljava/lang/Boolean;Ljava/util/Date;ILjava/util/List;Ljava/util/Set;Lio/getstream/chat/android/models/Member;Ljava/util/List;ZLjava/util/Date;Ljava/util/Map;ILjava/lang/Object;)Lio/getstream/chat/android/models/Channel; public fun equals (Ljava/lang/Object;)Z public final fun getCachedLatestMessages ()Ljava/util/List; public final fun getCid ()Ljava/lang/String; @@ -432,6 +431,7 @@ public final class io/getstream/chat/android/models/Channel$Builder { public fun (Lio/getstream/chat/android/models/Channel;)V public final fun build ()Lio/getstream/chat/android/models/Channel; public final fun withCachedLatestMessages (Ljava/util/List;)Lio/getstream/chat/android/models/Channel$Builder; + public final fun withChannelLastMessageAt (Ljava/util/Date;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withConfig (Lio/getstream/chat/android/models/Config;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withCooldown (I)Lio/getstream/chat/android/models/Channel$Builder; public final fun withCreatedAt (Ljava/util/Date;)Lio/getstream/chat/android/models/Channel$Builder; @@ -444,7 +444,6 @@ public final class io/getstream/chat/android/models/Channel$Builder { public final fun withId (Ljava/lang/String;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withImage (Ljava/lang/String;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withIsInsideSearch (Z)Lio/getstream/chat/android/models/Channel$Builder; - public final fun withLastMessageAt (Ljava/util/Date;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withMemberCount (I)Lio/getstream/chat/android/models/Channel$Builder; public final fun withMembers (Ljava/util/List;)Lio/getstream/chat/android/models/Channel$Builder; public final fun withMembership (Lio/getstream/chat/android/models/Member;)Lio/getstream/chat/android/models/Channel$Builder; @@ -552,7 +551,7 @@ public final class io/getstream/chat/android/models/ChannelData { public final fun getUpdatedAt ()Ljava/util/Date; public fun hashCode ()I public final fun isUserAbleTo (Ljava/lang/String;)Z - public final fun toChannel (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;IZ)Lio/getstream/chat/android/models/Channel; + public final fun toChannel (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;IZLjava/util/Date;)Lio/getstream/chat/android/models/Channel; public fun toString ()Ljava/lang/String; } @@ -641,8 +640,8 @@ public final class io/getstream/chat/android/models/Command { public final class io/getstream/chat/android/models/Config { public fun ()V - public fun (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/util/Date; public final fun component10 ()Z public final fun component11 ()Z @@ -650,13 +649,14 @@ public final class io/getstream/chat/android/models/Config { public final fun component13 ()Z public final fun component14 ()Z public final fun component15 ()Z - public final fun component16 ()Ljava/lang/String; - public final fun component17 ()I - public final fun component18 ()Ljava/lang/String; + public final fun component16 ()Z + public final fun component17 ()Ljava/lang/String; + public final fun component18 ()I public final fun component19 ()Ljava/lang/String; public final fun component2 ()Ljava/util/Date; public final fun component20 ()Ljava/lang/String; - public final fun component21 ()Ljava/util/List; + public final fun component21 ()Ljava/lang/String; + public final fun component22 ()Ljava/util/List; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Z public final fun component5 ()Z @@ -664,8 +664,8 @@ public final class io/getstream/chat/android/models/Config { public final fun component7 ()Z public final fun component8 ()Z public final fun component9 ()Z - public final fun copy (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lio/getstream/chat/android/models/Config; - public static synthetic fun copy$default (Lio/getstream/chat/android/models/Config;Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lio/getstream/chat/android/models/Config; + public final fun copy (Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lio/getstream/chat/android/models/Config; + public static synthetic fun copy$default (Lio/getstream/chat/android/models/Config;Ljava/util/Date;Ljava/util/Date;Ljava/lang/String;ZZZZZZZZZZZZZLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lio/getstream/chat/android/models/Config; public fun equals (Ljava/lang/Object;)Z public final fun getAutomod ()Ljava/lang/String; public final fun getAutomodBehavior ()Ljava/lang/String; @@ -682,6 +682,7 @@ public final class io/getstream/chat/android/models/Config { public final fun getPushNotificationsEnabled ()Z public final fun getReadEventsEnabled ()Z public final fun getSearchEnabled ()Z + public final fun getSkipLastMsgUpdateForSystemMsgs ()Z public final fun getTypingEventsEnabled ()Z public final fun getUpdatedAt ()Ljava/util/Date; public final fun getUploadsEnabled ()Z diff --git a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Channel.kt b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Channel.kt index e0b68ffcc68..c353975731d 100644 --- a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Channel.kt +++ b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Channel.kt @@ -31,7 +31,6 @@ import java.util.Date * @param image Channel's image. * @param watcherCount Number of channel watchers. * @param frozen Whether channel is frozen or not. - * @param lastMessageAt Date of the last message sent. * @param createdAt Date/time of creation. * @param deletedAt Date/time of deletion. * @param updatedAt Date/time of the last update. @@ -56,6 +55,7 @@ import java.util.Date * @param cachedLatestMessages The list of cached messages if the regular list does not contain the newest messages. * @param isInsideSearch When the channel is inside search, eg. searching from the channel list for a message or when * hopping to a quoted message a number pages away without retaining the newest messages in the list. + * @param channelLastMessageAt The date of the last message sent received from the backend. */ @Immutable public data class Channel( @@ -65,7 +65,6 @@ public data class Channel( val image: String = "", val watcherCount: Int = 0, val frozen: Boolean = false, - val lastMessageAt: Date? = null, val createdAt: Date? = null, val deletedAt: Date? = null, val updatedAt: Date? = null, @@ -95,9 +94,21 @@ public data class Channel( val membership: Member? = null, val cachedLatestMessages: List = emptyList(), val isInsideSearch: Boolean = false, + internal val channelLastMessageAt: Date? = null, override val extraData: Map = mapOf(), ) : CustomObject, ComparableFieldProvider { + /** + * The date of the last message sent. + */ + val lastMessageAt: Date? = channelLastMessageAt + ?: messages + .filterNot { it.shadowed } + .filterNot { it.parentId != null && !it.showInChannel } + .filterNot { type == MessageType.SYSTEM && config.skipLastMsgUpdateForSystemMsgs } + .maxByOrNull { it.createdAt ?: it.createdLocallyAt ?: Date(0) } + ?.let { it.createdAt ?: it.createdLocallyAt } + /** * The channel id in the format messaging:123. */ @@ -158,7 +169,7 @@ public data class Channel( private var image: String = "" private var watcherCount: Int = 0 private var frozen: Boolean = false - private var lastMessageAt: Date? = null + private var channelLastMessageAt: Date? = null private var createdAt: Date? = null private var deletedAt: Date? = null private var updatedAt: Date? = null @@ -189,7 +200,7 @@ public data class Channel( image = channel.image watcherCount = channel.watcherCount frozen = channel.frozen - lastMessageAt = channel.lastMessageAt + channelLastMessageAt = channel.channelLastMessageAt createdAt = channel.createdAt deletedAt = channel.deletedAt updatedAt = channel.updatedAt @@ -220,7 +231,9 @@ public data class Channel( public fun withImage(image: String): Builder = apply { this.image = image } public fun withWatcherCount(watcherCount: Int): Builder = apply { this.watcherCount = watcherCount } public fun withFrozen(frozen: Boolean): Builder = apply { this.frozen = frozen } - public fun withLastMessageAt(lastMessageAt: Date?): Builder = apply { this.lastMessageAt = lastMessageAt } + public fun withChannelLastMessageAt(channelLastMessageAt: Date?): Builder = apply { + this.channelLastMessageAt = channelLastMessageAt + } public fun withCreatedAt(createdAt: Date?): Builder = apply { this.createdAt = createdAt } public fun withDeletedAt(deletedAt: Date?): Builder = apply { this.deletedAt = deletedAt } public fun withUpdatedAt(updatedAt: Date?): Builder = apply { this.updatedAt = updatedAt } @@ -259,7 +272,7 @@ public data class Channel( image = image, watcherCount = watcherCount, frozen = frozen, - lastMessageAt = lastMessageAt, + channelLastMessageAt = channelLastMessageAt, createdAt = createdAt, deletedAt = deletedAt, updatedAt = updatedAt, @@ -300,10 +313,7 @@ public fun Channel.mergeChannelFromEvent(that: Channel): Channel { hiddenMessagesBefore = that.hiddenMessagesBefore, memberCount = that.memberCount, members = that.members, - lastMessageAt = when (that.lastMessageAt?.after(lastMessageAt)) { - true -> that.lastMessageAt - else -> this.lastMessageAt - }, + channelLastMessageAt = that.channelLastMessageAt, createdAt = that.createdAt, updatedAt = that.updatedAt, deletedAt = that.deletedAt, diff --git a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChannelData.kt b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChannelData.kt index 18617c09713..0a770192711 100644 --- a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChannelData.kt +++ b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/ChannelData.kt @@ -120,8 +120,8 @@ public data class ChannelData( watchers: List, watcherCount: Int, insideSearch: Boolean, + channelLastMessageAt: Date?, ): Channel { - val messagesList = if (insideSearch) cachedLatestMessages else messages return Channel( type = type, id = id, @@ -133,11 +133,7 @@ public data class ChannelData( deletedAt = deletedAt, extraData = extraData, cooldown = cooldown, - lastMessageAt = messagesList - .filterNot { it.shadowed } - .filterNot { it.parentId != null && !it.showInChannel } - .lastOrNull() - ?.let { it.createdAt ?: it.createdLocallyAt }, + channelLastMessageAt = channelLastMessageAt, createdBy = createdBy, messages = messages, members = members, diff --git a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Config.kt b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Config.kt index fdaffcbb5a8..fdb01d2632d 100644 --- a/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Config.kt +++ b/stream-chat-android-core/src/main/java/io/getstream/chat/android/models/Config.kt @@ -86,6 +86,11 @@ public data class Config( val pushNotificationsEnabled: Boolean = true, + /** + * Determines if the last message update should be skipped for system messages. Disabled by default. + */ + val skipLastMsgUpdateForSystemMsgs: Boolean = false, + /** * Determines if polls are enabled. Disabled by default. */ diff --git a/stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt b/stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt index 58857977600..d7170fcf9b4 100644 --- a/stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt +++ b/stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt @@ -216,7 +216,7 @@ public fun randomChannel( type: String = randomString(), watcherCount: Int = randomInt(), frozen: Boolean = randomBoolean(), - lastMessageAt: Date? = randomDate(), + channelLastMessageAt: Date? = randomDate(), createdAt: Date? = randomDate(), deletedAt: Date? = randomDate(), updatedAt: Date? = randomDate(), @@ -239,7 +239,7 @@ public fun randomChannel( type = type, watcherCount = watcherCount, frozen = frozen, - lastMessageAt = lastMessageAt, + channelLastMessageAt = channelLastMessageAt, createdAt = createdAt, deletedAt = deletedAt, updatedAt = updatedAt, diff --git a/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelMapper.kt b/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelMapper.kt index eb1ff6124a6..19d0f276123 100644 --- a/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelMapper.kt +++ b/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelMapper.kt @@ -73,7 +73,7 @@ internal suspend fun ChannelEntity.toModel( updatedAt = updatedAt, deletedAt = deletedAt, extraData = extraData.toMutableMap(), - lastMessageAt = lastMessageAt, + channelLastMessageAt = lastMessageAt, syncStatus = syncStatus, hidden = hidden, hiddenMessagesBefore = hideMessagesBefore, diff --git a/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/DatabaseChannelRepository.kt b/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/DatabaseChannelRepository.kt index 3db4e460d5a..fdcc5ed54d6 100644 --- a/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/DatabaseChannelRepository.kt +++ b/stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/channel/internal/DatabaseChannelRepository.kt @@ -20,7 +20,6 @@ import android.util.LruCache import io.getstream.chat.android.client.extensions.syncUnreadCountWithReads import io.getstream.chat.android.client.persistance.repository.ChannelRepository import io.getstream.chat.android.client.utils.message.isPinned -import io.getstream.chat.android.core.utils.date.maxOf import io.getstream.chat.android.core.utils.date.minOf import io.getstream.chat.android.models.Channel import io.getstream.chat.android.models.Member @@ -230,16 +229,7 @@ internal class DatabaseChannelRepository( */ override suspend fun updateLastMessageForChannel(cid: String, lastMessage: Message) { selectChannel(cid)?.let { - insertChannel( - it.copy( - messages = listOf(lastMessage), - lastMessageAt = it.lastMessageAt - .takeIf { lastMessage.parentId != null && !lastMessage.showInChannel } - ?: lastMessage.createdAt - ?: lastMessage.createdLocallyAt - ?: Date(0), - ), - ) + insertChannel(it.copy(messages = listOf(lastMessage))) } } @@ -254,14 +244,6 @@ internal class DatabaseChannelRepository( val read = (read + cachedChannel.read).distinctBy { it.getUserId() } return copy( messages = messages, - lastMessageAt = maxOf( - lastMessageAt, - cachedChannel.lastMessageAt, - messages - .filterNot { it.parentId != null && !it.showInChannel } - .lastOrNull() - ?.let { it.createdAt ?: it.createdLocallyAt ?: Date(0) }, - ), hiddenMessagesBefore = hideMessagesBefore, members = members, read = read, diff --git a/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/PaginationTest.kt b/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/PaginationTest.kt index 9fb7874b187..6d2c8e5d4c6 100644 --- a/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/PaginationTest.kt +++ b/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/PaginationTest.kt @@ -158,9 +158,13 @@ internal class PaginationTest { }, // last_updated is a computed field based on max(createdAt, lastMessageAt) listOf( - randomChannel(type = "c", createdAt = null, lastMessageAt = calendar(2020, 10, 2)), - randomChannel(type = "a", createdAt = calendar(2020, 10, 4), lastMessageAt = null), - randomChannel(type = "b", createdAt = calendar(2020, 10, 1), lastMessageAt = calendar(2020, 10, 3)), + randomChannel(type = "c", createdAt = null, channelLastMessageAt = calendar(2020, 10, 2)), + randomChannel(type = "a", createdAt = calendar(2020, 10, 4), channelLastMessageAt = null), + randomChannel( + type = "b", + createdAt = calendar(2020, 10, 1), + channelLastMessageAt = calendar(2020, 10, 3), + ), ).let { Arguments.of( it, @@ -186,9 +190,9 @@ internal class PaginationTest { }, // last_message_at should map to channel.lastMessageAt listOf( - randomChannel(type = "c", lastMessageAt = calendar(2020, 10, 2)), - randomChannel(type = "a", lastMessageAt = calendar(2020, 10, 4)), - randomChannel(type = "b", lastMessageAt = calendar(2020, 10, 3)), + randomChannel(type = "c", channelLastMessageAt = calendar(2020, 10, 2)), + randomChannel(type = "a", channelLastMessageAt = calendar(2020, 10, 4)), + randomChannel(type = "b", channelLastMessageAt = calendar(2020, 10, 3)), ).let { Arguments.of( it, diff --git a/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelRepositoryImplTest.kt b/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelRepositoryImplTest.kt index 2e3bd7ec5d3..8def1f21aaa 100644 --- a/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelRepositoryImplTest.kt +++ b/stream-chat-android-offline/src/test/java/io/getstream/chat/android/offline/repository/domain/channel/internal/ChannelRepositoryImplTest.kt @@ -26,14 +26,11 @@ import io.getstream.chat.android.randomUser import io.getstream.chat.android.test.TestCoroutineRule import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest -import org.amshove.kluent.`should be equal to` -import org.amshove.kluent.shouldBeEqualTo import org.junit.Rule import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.Mockito import org.mockito.kotlin.any -import org.mockito.kotlin.check import org.mockito.kotlin.doReturn import org.mockito.kotlin.mock import org.mockito.kotlin.never @@ -65,63 +62,6 @@ internal class ChannelRepositoryImplTest { reset(channelDao) } - @Test - fun `Given channel without messages in DB, Should insert channel with updated last message`() = runTest { - val channel = randomChannel(messages = emptyList()) - val lastMessage = randomMessage( - createdAt = Date(), - deletedAt = null, - parentId = null, - ) - whenever(channelDao.select("cid")) doReturn channel.toEntity() - - channelRepository.updateLastMessageForChannel("cid", lastMessage) - - verify(channelDao).insertMany( - check { channelEntities -> - channelEntities.size `should be equal to` 1 - with(channelEntities.first()) { - cid `should be equal to` channel.cid - lastMessageAt `should be equal to` lastMessage.createdAt - lastMessageId `should be equal to` lastMessage.id - } - }, - ) - } - - @Test - fun `Given channel with outdated lastMessage in DB, Should insert channel with updated last message`() = runTest { - val before = Date(1000) - val after = Date(2000) - val outdatedMessage = randomMessage( - id = "messageId1", - createdAt = before, - parentId = null, - deletedAt = null, - ) - val newLastMessage = randomMessage( - id = "messageId2", - createdAt = after, - parentId = null, - deletedAt = null, - ) - val channel = randomChannel(messages = listOf(outdatedMessage), lastMessageAt = before) - whenever(channelDao.select(cid = "cid")) doReturn channel.toEntity() - - channelRepository.updateLastMessageForChannel("cid", newLastMessage) - - verify(channelDao).insertMany( - check { channelEntities -> - channelEntities.size shouldBeEqualTo 1 - with(channelEntities.first()) { - cid `should be equal to` channel.cid - lastMessageAt `should be equal to` after - lastMessageId `should be equal to` newLastMessage.id - } - }, - ) - } - @Test fun `Given channel with recent lastMessage in DB, Should NOT insert channel`() = runTest { reset(channelDao) @@ -130,7 +70,7 @@ internal class ChannelRepositoryImplTest { val after = Date(2000) val outdatedMessage = randomMessage(id = "messageId1", createdAt = before) val newLastMessage = randomMessage(id = "messageId2", createdAt = after) - val channel = randomChannel(messages = listOf(newLastMessage), lastMessageAt = after) + val channel = randomChannel(messages = listOf(newLastMessage), channelLastMessageAt = after) whenever(channelDao.select(cid = "cid")) doReturn channel.toEntity() channelRepository.updateLastMessageForChannel("cid", outdatedMessage) diff --git a/stream-chat-android-previewdata/src/main/kotlin/io/getstream/chat/android/previewdata/PreviewChannelData.kt b/stream-chat-android-previewdata/src/main/kotlin/io/getstream/chat/android/previewdata/PreviewChannelData.kt index 421efaaed42..07a0c9f6f51 100644 --- a/stream-chat-android-previewdata/src/main/kotlin/io/getstream/chat/android/previewdata/PreviewChannelData.kt +++ b/stream-chat-android-previewdata/src/main/kotlin/io/getstream/chat/android/previewdata/PreviewChannelData.kt @@ -85,6 +85,6 @@ public object PreviewChannelData { PreviewMessageData.message1, PreviewMessageData.message2, ), - lastMessageAt = Date(), + channelLastMessageAt = Date(), ) } diff --git a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/EventHandlerSequential.kt b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/EventHandlerSequential.kt index bfe43da36e9..2de180e963f 100644 --- a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/EventHandlerSequential.kt +++ b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/event/handler/internal/EventHandlerSequential.kt @@ -491,6 +491,11 @@ internal class EventHandlerSequential( // step 2. second pass through the events, make a list of what we need to update for (event in events) { + if (event is CidEvent) { + batch.getCurrentChannel(event.cid)?.let { channel -> + batch.addChannel(channel.copy(channelLastMessageAt = event.channelLastMessageAt)) + } + } when (event) { is ConnectedEvent -> if (batchEvent.isFromSocketConnection) { event.me.id mustBe currentUserId diff --git a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelLogic.kt b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelLogic.kt index c73bef8cc4f..6e665b38a98 100644 --- a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelLogic.kt +++ b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/logic/channel/internal/ChannelLogic.kt @@ -31,6 +31,7 @@ import io.getstream.chat.android.client.events.ChannelUserBannedEvent import io.getstream.chat.android.client.events.ChannelUserUnbannedEvent import io.getstream.chat.android.client.events.ChannelVisibleEvent import io.getstream.chat.android.client.events.ChatEvent +import io.getstream.chat.android.client.events.CidEvent import io.getstream.chat.android.client.events.ConnectedEvent import io.getstream.chat.android.client.events.ConnectingEvent import io.getstream.chat.android.client.events.ConnectionErrorEvent @@ -521,154 +522,125 @@ internal class ChannelLogic( val currentUserId = getCurrentUserId() logger.d { "[handleEvent] cid: $cid, currentUserId: $currentUserId, event: $event" } when (event) { - is NewMessageEvent -> { - upsertEventMessage(event.message) - channelStateLogic.updateCurrentUserRead(event.createdAt, event.message) - channelStateLogic.takeUnless { event.message.shadowed }?.toggleHidden(false) - } - is MessageUpdatedEvent -> { - event.message.copy( - replyTo = event.message.replyMessageId - ?.let { mutableState.getMessageById(it) } - ?: event.message.replyTo, - ).let(::upsertEventMessage) - - channelStateLogic.toggleHidden(false) - } - is MessageDeletedEvent -> { - if (event.hardDelete) { - deleteMessage(event.message) - } else { - upsertEventMessage(event.message) - } - channelStateLogic.toggleHidden(false) - } - is NotificationMessageNewEvent -> { - if (!mutableState.insideSearch.value) { - upsertEventMessage(event.message) - } - channelStateLogic.updateCurrentUserRead(event.createdAt, event.message) - channelStateLogic.toggleHidden(false) - } - is NotificationThreadMessageNewEvent -> { - upsertEventMessage(event.message) - } - is ReactionNewEvent -> { - upsertEventMessage(event.message) - } - is ReactionUpdateEvent -> { - upsertEventMessage(event.message) - } - is ReactionDeletedEvent -> { - upsertEventMessage(event.message) - } - is MemberRemovedEvent -> { - if (event.user.id == currentUserId) { - logger.i { "[handleEvent] skip MemberRemovedEvent for currentUser" } - return - } - channelStateLogic.deleteMember(event.member) - } - is NotificationRemovedFromChannelEvent -> { - channelStateLogic.setMembers(event.channel.members, event.channel.memberCount) - channelStateLogic.setWatchers(event.channel.watchers, event.channel.watcherCount) - } - is MemberAddedEvent -> { - channelStateLogic.addMember(event.member) - } - is MemberUpdatedEvent -> { - channelStateLogic.upsertMember(event.member) - channelStateLogic.updateMembership(event.member) - } - is NotificationAddedToChannelEvent -> { - channelStateLogic.upsertMembers(event.channel.members) - } - is UserPresenceChangedEvent -> { - upsertUserPresence(event.user) - } - is UserUpdatedEvent -> { - upsertUser(event.user) - } - is UserStartWatchingEvent -> { - channelStateLogic.upsertWatcher(event) - } - is UserStopWatchingEvent -> { - channelStateLogic.deleteWatcher(event) - } - is ChannelUpdatedEvent -> { - channelStateLogic.updateChannelData(event) - } - is ChannelUpdatedByUserEvent -> { - channelStateLogic.updateChannelData(event) - } - is ChannelHiddenEvent -> { - channelStateLogic.toggleHidden(true) - if (event.clearHistory) { - removeMessagesBefore(event.createdAt) + is CidEvent -> { + channelStateLogic.setLastSentMessageDate(event.channelLastMessageAt) + when (event) { + is NewMessageEvent -> { + upsertEventMessage(event.message) + channelStateLogic.updateCurrentUserRead(event.createdAt, event.message) + channelStateLogic.takeUnless { event.message.shadowed }?.toggleHidden(false) + } + is MessageUpdatedEvent -> { + event.message.copy( + replyTo = event.message.replyMessageId + ?.let { mutableState.getMessageById(it) } + ?: event.message.replyTo, + ).let(::upsertEventMessage) + channelStateLogic.toggleHidden(false) + } + is MessageDeletedEvent -> { + if (event.hardDelete) { + deleteMessage(event.message) + } else { + upsertEventMessage(event.message) + } + channelStateLogic.toggleHidden(false) + } + is NotificationMessageNewEvent -> { + if (!mutableState.insideSearch.value) { + upsertEventMessage(event.message) + } + channelStateLogic.updateCurrentUserRead(event.createdAt, event.message) + channelStateLogic.toggleHidden(false) + } + is NotificationThreadMessageNewEvent -> upsertEventMessage(event.message) + is ReactionNewEvent -> upsertEventMessage(event.message) + is ReactionUpdateEvent -> upsertEventMessage(event.message) + is ReactionDeletedEvent -> upsertEventMessage(event.message) + is MemberRemovedEvent -> { + if (event.user.id == currentUserId) { + logger.i { "[handleEvent] skip MemberRemovedEvent for currentUser" } + return + } + channelStateLogic.deleteMember(event.member) + } + is NotificationRemovedFromChannelEvent -> { + channelStateLogic.setMembers(event.channel.members, event.channel.memberCount) + channelStateLogic.setWatchers(event.channel.watchers, event.channel.watcherCount) + } + is MemberAddedEvent -> channelStateLogic.addMember(event.member) + is MemberUpdatedEvent -> { + channelStateLogic.upsertMember(event.member) + channelStateLogic.updateMembership(event.member) + } + is NotificationAddedToChannelEvent -> channelStateLogic.upsertMembers(event.channel.members) + is UserStartWatchingEvent -> channelStateLogic.upsertWatcher(event) + is UserStopWatchingEvent -> channelStateLogic.deleteWatcher(event) + is ChannelUpdatedEvent -> channelStateLogic.updateChannelData(event) + is ChannelUpdatedByUserEvent -> channelStateLogic.updateChannelData(event) + is ChannelHiddenEvent -> { + channelStateLogic.toggleHidden(true) + if (event.clearHistory) { + removeMessagesBefore(event.createdAt) + } + } + is ChannelVisibleEvent -> channelStateLogic.toggleHidden(false) + is ChannelDeletedEvent -> { + removeMessagesBefore(event.createdAt) + channelStateLogic.deleteChannel(event.createdAt) + } + is ChannelTruncatedEvent -> removeMessagesBefore(event.createdAt, event.message) + is NotificationChannelTruncatedEvent -> removeMessagesBefore(event.createdAt) + is TypingStopEvent -> channelStateLogic.setTyping(event.user.id, null) + is TypingStartEvent -> channelStateLogic.setTyping(event.user.id, event) + is MessageReadEvent -> channelStateLogic.updateRead(event.toChannelUserRead()) + is NotificationMarkReadEvent -> channelStateLogic.updateRead(event.toChannelUserRead()) + is NotificationMarkUnreadEvent -> channelStateLogic.updateRead(event.toChannelUserRead()) + is NotificationInviteAcceptedEvent -> { + channelStateLogic.addMember(event.member) + channelStateLogic.updateChannelData(event) + } + is NotificationInviteRejectedEvent -> { + channelStateLogic.deleteMember(event.member) + channelStateLogic.updateChannelData(event) + } + is ChannelUserBannedEvent -> { + channelStateLogic.updateMemberBanned( + memberUserId = event.user.id, + banned = true, + banExpires = event.expiration, + shadow = event.shadow, + ) + } + is ChannelUserUnbannedEvent -> { + channelStateLogic.updateMemberBanned( + memberUserId = event.user.id, + banned = false, + banExpires = null, + shadow = false, + ) + } + is PollClosedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) + is PollDeletedEvent -> channelStateLogic.upsertPoll(event.poll) + is PollUpdatedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) + is VoteCastedEvent -> + channelStateLogic.upsertPoll(event.processPoll(currentUserId, channelStateLogic::getPoll)) + is VoteChangedEvent -> + channelStateLogic.upsertPoll(event.processPoll(currentUserId, channelStateLogic::getPoll)) + is VoteRemovedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) + is AnswerCastedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) + is NotificationChannelDeletedEvent, + is NotificationInvitedEvent, + -> Unit // Ignore these events } } - is ChannelVisibleEvent -> { - channelStateLogic.toggleHidden(false) - } - is ChannelDeletedEvent -> { - removeMessagesBefore(event.createdAt) - channelStateLogic.deleteChannel(event.createdAt) - } - is ChannelTruncatedEvent -> { - removeMessagesBefore(event.createdAt, event.message) - } - is NotificationChannelTruncatedEvent -> { - removeMessagesBefore(event.createdAt) - } - is TypingStopEvent -> { - channelStateLogic.setTyping(event.user.id, null) - } - is TypingStartEvent -> { - channelStateLogic.setTyping(event.user.id, event) - } - is MessageReadEvent -> { - channelStateLogic.updateRead(event.toChannelUserRead()) - } - is NotificationMarkReadEvent -> { - channelStateLogic.updateRead(event.toChannelUserRead()) - } - is MarkAllReadEvent -> { - channelStateLogic.updateRead(event.toChannelUserRead()) - } - is NotificationMarkUnreadEvent -> { - channelStateLogic.updateRead(event.toChannelUserRead()) - } - is NotificationInviteAcceptedEvent -> { - channelStateLogic.addMember(event.member) - channelStateLogic.updateChannelData(event) - } - is NotificationInviteRejectedEvent -> { - channelStateLogic.deleteMember(event.member) - channelStateLogic.updateChannelData(event) - } - is NotificationChannelMutesUpdatedEvent -> { - event.me.channelMutes.any { mute -> - mute.channel?.cid == mutableState.cid - }.let(channelStateLogic::updateMute) - } - is ChannelUserBannedEvent -> { - channelStateLogic.updateMemberBanned( - memberUserId = event.user.id, - banned = true, - banExpires = event.expiration, - shadow = event.shadow, - ) - } - is ChannelUserUnbannedEvent -> { - channelStateLogic.updateMemberBanned( - memberUserId = event.user.id, - banned = false, - banExpires = null, - shadow = false, - ) - } - is NotificationChannelDeletedEvent, - is NotificationInvitedEvent, + + is UserPresenceChangedEvent -> upsertUserPresence(event.user) + is UserUpdatedEvent -> upsertUser(event.user) + is MarkAllReadEvent -> channelStateLogic.updateRead(event.toChannelUserRead()) + is NotificationChannelMutesUpdatedEvent -> event.me.channelMutes.any { mute -> + mute.channel?.cid == mutableState.cid + }.let(channelStateLogic::updateMute) is ConnectedEvent, is ConnectionErrorEvent, is ConnectingEvent, @@ -681,15 +653,6 @@ internal class ChannelLogic( is UnknownEvent, is UserDeletedEvent, -> Unit // Ignore these events - is PollClosedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) - is PollDeletedEvent -> channelStateLogic.upsertPoll(event.poll) - is PollUpdatedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) - is VoteCastedEvent -> - channelStateLogic.upsertPoll(event.processPoll(currentUserId, channelStateLogic::getPoll)) - is VoteChangedEvent -> - channelStateLogic.upsertPoll(event.processPoll(currentUserId, channelStateLogic::getPoll)) - is VoteRemovedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) - is AnswerCastedEvent -> channelStateLogic.upsertPoll(event.processPoll(channelStateLogic::getPoll)) } } diff --git a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/state/channel/internal/ChannelMutableState.kt b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/state/channel/internal/ChannelMutableState.kt index ba587370139..3ba774dfc7f 100644 --- a/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/state/channel/internal/ChannelMutableState.kt +++ b/stream-chat-android-state/src/main/java/io/getstream/chat/android/state/plugin/state/channel/internal/ChannelMutableState.kt @@ -237,26 +237,22 @@ internal class ChannelMutableState( override fun toChannel(): Channel { // recreate a channel object from the various observables. - val channelData = channelData.value - - val messages = sortedMessages.value - val pinnedMessages = sortedPinnedMessages.value - val cachedMessages = cachedLatestMessages.value.values.toList() - val members = members.value - val watchers = watchers.value - val reads = rawReads.value.values.toList() - val watcherCount = watcherCount.value - val insideSearch = insideSearch.value - - val channel = channelData - .toChannel(messages, cachedMessages, members, reads, watchers, watcherCount, insideSearch) - return channel.copy( - config = channelConfig.value, - hidden = hidden.value, - isInsideSearch = insideSearch, - cachedLatestMessages = cachedLatestMessages.value.values.toList(), - pinnedMessages = pinnedMessages, - ).syncUnreadCountWithReads() + return channelData.value + .toChannel( + messages = sortedMessages.value, + cachedLatestMessages = cachedLatestMessages.value.values.toList(), + members = members.value, + reads = rawReads.value.values.toList(), + watchers = watchers.value, + watcherCount = watcherCount.value, + insideSearch = insideSearch.value, + channelLastMessageAt = lastSentMessageDate.value, + ) + .copy( + config = channelConfig.value, + hidden = hidden.value, + pinnedMessages = sortedPinnedMessages.value, + ).syncUnreadCountWithReads() } /** diff --git a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/facade/WhenUpdateLastMessage.kt b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/facade/WhenUpdateLastMessage.kt index 933ab2662f8..0bf2c518659 100644 --- a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/facade/WhenUpdateLastMessage.kt +++ b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/facade/WhenUpdateLastMessage.kt @@ -47,7 +47,7 @@ internal class WhenUpdateLastMessage : BaseRepositoryFacadeTest() { val after = Date(2000) val outdatedMessage = randomMessage(id = "messageId1", createdAt = before) val newLastMessage = randomMessage(id = "messageId2", createdAt = after) - val channel = randomChannel(messages = listOf(newLastMessage), lastMessageAt = after) + val channel = randomChannel(messages = listOf(newLastMessage), channelLastMessageAt = after) whenever(channels.selectChannel(eq("cid"))) doReturn channel sut.updateLastMessageForChannel("cid", outdatedMessage) diff --git a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/internal/extensions/ChannelExtensionsTest.kt b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/internal/extensions/ChannelExtensionsTest.kt index cdf15f45cfb..68868c7bb69 100644 --- a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/internal/extensions/ChannelExtensionsTest.kt +++ b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/internal/extensions/ChannelExtensionsTest.kt @@ -79,9 +79,9 @@ internal class ChannelExtensionsTest { @Test fun `When apply pagination Should sort correctly descending`() { - val firstChannel = randomChannel(lastMessageAt = Date(1000)) - val secondChannel = randomChannel(lastMessageAt = Date(3000)) - val thirdChannel = randomChannel(lastMessageAt = Date(2000)) + val firstChannel = randomChannel(channelLastMessageAt = Date(1000)) + val secondChannel = randomChannel(channelLastMessageAt = Date(3000)) + val thirdChannel = randomChannel(channelLastMessageAt = Date(2000)) val sort = QuerySortByField.descByName("lastMessageAt") val queryPaginationRequest = QueryChannelsPaginationRequest( sort = sort, @@ -103,9 +103,9 @@ internal class ChannelExtensionsTest { @Test fun `When apply pagination Should sort correctly ascending`() { - val firstChannel = randomChannel(lastMessageAt = Date(1000)) - val secondChannel = randomChannel(lastMessageAt = Date(3000)) - val thirdChannel = randomChannel(lastMessageAt = Date(2000)) + val firstChannel = randomChannel(channelLastMessageAt = Date(1000)) + val secondChannel = randomChannel(channelLastMessageAt = Date(3000)) + val thirdChannel = randomChannel(channelLastMessageAt = Date(2000)) val sort = QuerySortByField.ascByName("lastMessageAt") val queryPaginationRequest = QueryChannelsPaginationRequest( sort = sort, diff --git a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt index 7a5e1cd3d72..7b8eb96138f 100644 --- a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt +++ b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/plugin/logic/querythreads/internal/QueryThreadsLogicTest.kt @@ -271,6 +271,7 @@ internal class QueryThreadsLogicTest { channelType = "messaging", channelId = "123", channel = Channel(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -297,6 +298,7 @@ internal class QueryThreadsLogicTest { rawCreatedAt = "", unreadThreads = 1, unreadThreadMessages = 2, + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -322,6 +324,7 @@ internal class QueryThreadsLogicTest { rawCreatedAt = "", unreadThreads = 1, unreadThreadMessages = 2, + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -349,6 +352,7 @@ internal class QueryThreadsLogicTest { firstUnreadMessageId = "mId2", threadId = null, unreadMessages = 1, + channelLastMessageAt = Date(), ) val stateLogic = mock() doNothing().whenever(stateLogic).markThreadAsUnreadByUser(any(), any(), any()) @@ -376,6 +380,7 @@ internal class QueryThreadsLogicTest { firstUnreadMessageId = "mId1", threadId = "mId1", unreadMessages = 1, + channelLastMessageAt = Date(), ) val stateLogic = mock() doNothing().whenever(stateLogic).markThreadAsUnreadByUser(any(), any(), any()) @@ -413,6 +418,7 @@ internal class QueryThreadsLogicTest { updatedAt = Date(), ), user = User(id = "usrId2"), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -435,6 +441,7 @@ internal class QueryThreadsLogicTest { createdAt = Date(), rawCreatedAt = "", user = User(id = "usrId2"), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -458,6 +465,7 @@ internal class QueryThreadsLogicTest { channelType = "messaging", channelId = "123", message = Message(id = "mId4", parentId = "mId1", text = "New reply"), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -481,6 +489,7 @@ internal class QueryThreadsLogicTest { channelType = "messaging", channelId = "123", message = Message(id = "mId1", text = "Updated thread parent"), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -506,6 +515,7 @@ internal class QueryThreadsLogicTest { channelType = "messaging", channelId = "123", message = Message(id = "mId2", text = "Updated thread reply"), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -532,6 +542,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId1", text = "Deleted thread parent"), hardDelete = false, + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -558,6 +569,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId2", text = "Deleted thread reply"), hardDelete = false, + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -584,6 +596,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId1", text = "Thread parent"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -610,6 +623,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId2", text = "Thread reply"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -636,6 +650,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId1", text = "Thread parent"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -662,6 +677,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId2", text = "Thread reply"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -688,6 +704,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId1", text = "Thread parent"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() @@ -714,6 +731,7 @@ internal class QueryThreadsLogicTest { channelId = "123", message = Message(id = "mId2", text = "Thread reply"), reaction = Reaction(), + channelLastMessageAt = Date(), ) val stateLogic = mock() val databaseLogic = mock() diff --git a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/querychannels/QueryChannelsSortTest.kt b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/querychannels/QueryChannelsSortTest.kt index be138b0e588..4714a861bf7 100644 --- a/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/querychannels/QueryChannelsSortTest.kt +++ b/stream-chat-android-state/src/test/java/io/getstream/chat/android/state/querychannels/QueryChannelsSortTest.kt @@ -66,7 +66,7 @@ internal class QueryChannelsSortTest { ) { randomChannel( createdAt = dateWithOffset(offsetSeconds = -100), - lastMessageAt = dateWithOffset(offsetSeconds = it), + channelLastMessageAt = dateWithOffset(offsetSeconds = it), ) }, sortArguments( @@ -75,7 +75,7 @@ internal class QueryChannelsSortTest { ) { randomChannel( createdAt = dateWithOffset(offsetSeconds = -100), - lastMessageAt = dateWithOffset(offsetSeconds = -it), + channelLastMessageAt = dateWithOffset(offsetSeconds = -it), ) }, sortArguments( @@ -84,7 +84,7 @@ internal class QueryChannelsSortTest { ) { randomChannel( createdAt = dateWithOffset(offsetSeconds = -100), - lastMessageAt = dateWithOffset(offsetSeconds = it), + channelLastMessageAt = dateWithOffset(offsetSeconds = it), ) }, sortArguments( @@ -93,7 +93,7 @@ internal class QueryChannelsSortTest { ) { randomChannel( createdAt = dateWithOffset(offsetSeconds = -100), - lastMessageAt = dateWithOffset(offsetSeconds = -it), + channelLastMessageAt = dateWithOffset(offsetSeconds = -it), ) }, ) @@ -104,25 +104,25 @@ internal class QueryChannelsSortTest { testName = "Sorting by lastMessageAt field reference in ascending order", querySort = QuerySortByField.ascByName("lastMessageAt"), ) { - randomChannel(lastMessageAt = dateWithOffset(offsetSeconds = it)) + randomChannel(channelLastMessageAt = dateWithOffset(offsetSeconds = it)) }, sortArguments( testName = "Sorting by lastMessageAt field reference in descending order", querySort = QuerySortByField.descByName("lastMessageAt"), ) { - randomChannel(lastMessageAt = dateWithOffset(offsetSeconds = -it)) + randomChannel(channelLastMessageAt = dateWithOffset(offsetSeconds = -it)) }, sortArguments( testName = "Sorting by last_message_at field name in ascending order", querySort = QuerySortByField.ascByName("last_message_at"), ) { - randomChannel(lastMessageAt = dateWithOffset(offsetSeconds = it)) + randomChannel(channelLastMessageAt = dateWithOffset(offsetSeconds = it)) }, sortArguments( testName = "Sorting by last_message_at field name in descending order", querySort = QuerySortByField.descByName("last_message_at"), ) { - randomChannel(lastMessageAt = dateWithOffset(offsetSeconds = -it)) + randomChannel(channelLastMessageAt = dateWithOffset(offsetSeconds = -it)) }, ) diff --git a/stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListControllerTests.kt b/stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListControllerTests.kt index 9440332535f..c241d7c5aec 100644 --- a/stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListControllerTests.kt +++ b/stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListControllerTests.kt @@ -752,6 +752,7 @@ internal class MessageListControllerTests { watchers, watcherCount, insideSearch, + null, ) return channel.copy( config = channelConfig.value, diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.kt index 5b8249d3604..4adbeae6d8e 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.kt @@ -44,7 +44,6 @@ import io.getstream.chat.android.ui.feature.channels.list.adapter.ChannelListIte import io.getstream.chat.android.ui.feature.channels.list.adapter.ChannelListPayloadDiff import io.getstream.chat.android.ui.feature.channels.list.adapter.viewholder.SwipeViewHolder import io.getstream.chat.android.ui.font.setTextStyle -import io.getstream.chat.android.ui.utils.extensions.getCreatedAtOrThrow import io.getstream.chat.android.ui.utils.extensions.getDimension import io.getstream.chat.android.ui.utils.extensions.getLastMessage import io.getstream.chat.android.ui.utils.extensions.isMuted @@ -291,7 +290,7 @@ internal class ChannelViewHolder @JvmOverloads constructor( message = lastMessage, currentUser = ChatUI.currentUserProvider.getCurrentUser(), ) - lastMessageTimeLabel.text = ChatUI.dateFormatter.formatDate(lastMessage.getCreatedAtOrThrow()) + lastMessageTimeLabel.text = ChatUI.dateFormatter.formatDate(channel.lastMessageAt) } private fun StreamUiChannelListItemForegroundViewBinding.configureUnreadCountBadge() {