diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt index 093176241b4..baa7bef0e91 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt @@ -4289,6 +4289,11 @@ internal constructor( * * @param userId The ID of the user to un-flag. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) @CheckResult public fun unflagUser(userId: String): Call = api.unflagUser(userId) @@ -4315,6 +4320,11 @@ internal constructor( * * @param messageId The ID of the message to un-flag. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) @CheckResult public fun unflagMessage(messageId: String): Call = api.unflagMessage(messageId) diff --git a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientModerationApiTests.kt b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientModerationApiTests.kt index fa3112b7fb6..112fad936de 100644 --- a/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientModerationApiTests.kt +++ b/stream-chat-android-client/src/test/java/io/getstream/chat/android/client/ChatClientModerationApiTests.kt @@ -44,6 +44,7 @@ import org.mockito.kotlin.whenever /** * Tests for the moderation functionalities of the [ChatClient]. */ +@Suppress("DEPRECATION") internal class ChatClientModerationApiTests : BaseChatClientTest() { @Test diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel.kt index a2da0e4df9b..f546c435480 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/messages/MessageListViewModel.kt @@ -410,6 +410,12 @@ public class MessageListViewModel( * * @param userId The ID of the user to un-flag. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) + @Suppress("DEPRECATION") public fun unflagUser(userId: String) { messageListController.unflagUser(userId) } diff --git a/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt b/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt index 9c50cdcc68c..d9e0fe7e2a6 100644 --- a/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt +++ b/stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.kt @@ -2246,6 +2246,12 @@ public class MessageListController( * * @param userId The ID of the user to un-flag. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) + @Suppress("DEPRECATION") public fun unflagUser(userId: String) { chatClient .unflagUser(userId = userId) @@ -2610,6 +2616,11 @@ public class MessageListController( * * @param streamError Contains the original [Throwable] along with a message. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) public data class UnflagUserError(override val streamError: Error) : ErrorEvent(streamError) /** diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/MessageListView.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/MessageListView.kt index 57b51087694..0f8858df0f5 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/MessageListView.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/MessageListView.kt @@ -301,6 +301,7 @@ public class MessageListView : ConstraintLayout { } } + @Suppress("DEPRECATION") private var errorEventHandler = ErrorEventHandler { error -> when (error) { is MessageListController.ErrorEvent.MuteUserError -> R.string.stream_ui_message_list_error_mute_user diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/messages/MessageListViewModel.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/messages/MessageListViewModel.kt index 6aea34159f1..a9cbacaa90e 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/messages/MessageListViewModel.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/messages/MessageListViewModel.kt @@ -213,7 +213,7 @@ public class MessageListViewModel( /** * Handles an [Event] coming from the View layer. */ - @Suppress("LongMethod", "ComplexMethod") + @Suppress("LongMethod", "ComplexMethod", "DEPRECATION") public fun onEvent(event: Event) { logger.v { "[onEvent] event: $event" } when (event) { @@ -735,6 +735,11 @@ public class MessageListViewModel( * * @param userId The ID of the user to un-flag. */ + @Deprecated( + message = "The backend no longer supports un-flagging. This call does nothing and will be removed " + + "in the next major version.", + level = DeprecationLevel.WARNING, + ) public data class UnflagUser(val userId: String) : Event() /**