Skip to content

Commit

Permalink
send encoded content added to Conversation class (#349)
Browse files Browse the repository at this point in the history
Co-authored-by: cameronvoell <[email protected]>
  • Loading branch information
cameronvoell and cameronvoell authored Dec 12, 2024
1 parent a064b15 commit a47853a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a47853a

Please sign in to comment.