diff --git a/library/src/main/java/org/xmtp/android/library/Conversation.kt b/library/src/main/java/org/xmtp/android/library/Conversation.kt index dc631066..778b8a01 100644 --- a/library/src/main/java/org/xmtp/android/library/Conversation.kt +++ b/library/src/main/java/org/xmtp/android/library/Conversation.kt @@ -1,6 +1,7 @@ package org.xmtp.android.library import kotlinx.coroutines.flow.Flow +import org.xmtp.android.library.codecs.EncodedContent import org.xmtp.android.library.libxmtp.Member import org.xmtp.android.library.libxmtp.Message import java.util.Date @@ -78,6 +79,13 @@ sealed class Conversation { } } + suspend fun send(encodedContent: EncodedContent): String { + return when (this) { + is Group -> group.send(encodedContent) + is Dm -> dm.send(encodedContent) + } + } + suspend fun send(text: String): String { return when (this) { is Group -> group.send(text)