Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send encoded content added to Conversation class #349

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading