diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt index ae18655113..91375551ac 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/ChatNetworkDataSource.kt @@ -63,5 +63,5 @@ interface ChatNetworkDataSource { fun deleteChatMessage(credentials: String, url: String): Observable fun createRoom(credentials: String, url: String, map: Map): Observable fun setChatReadMarker(credentials: String, url: String, previousMessageId: Int): Observable - fun editChatMessage(credentials: String, url: String, text: String): Observable + suspend fun editChatMessage(credentials: String, url: String, text: String): ChatOverallSingleMessage } diff --git a/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt b/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt index 9733a890ab..1b8bb48d21 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/data/network/RetrofitChatNetwork.kt @@ -179,7 +179,6 @@ class RetrofitChatNetwork(private val ncApi: NcApi, private val ncApiCoroutines: previousMessageId: Int ): Observable = ncApi.setChatReadMarker(credentials, url, previousMessageId).map { it } - override fun editChatMessage(credentials: String, url: String, text: String): Observable { - return ncApi.editChatMessage(credentials, url, text).map { it } - } + override suspend fun editChatMessage(credentials: String, url: String, text: String): ChatOverallSingleMessage = + ncApiCoroutines.editChatMessage(credentials, url, text) }