Skip to content

Commit

Permalink
use created At
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jan 23, 2024
1 parent 15db4e8 commit 88a2c77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sealed class Conversation {
return when (this) {
is V1 -> conversationV1.sentAt
is V2 -> conversationV2.createdAt
is Group -> TODO()
is Group -> group.createdAt
}
}

Expand Down
4 changes: 4 additions & 0 deletions library/src/main/java/org/xmtp/android/library/Group.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import kotlinx.coroutines.runBlocking
import org.xmtp.android.library.libxmtp.Message
import uniffi.xmtpv3.FfiGroup
import uniffi.xmtpv3.FfiListMessagesOptions
import java.util.Date

class Group(val client: Client, val libXMTPGroup: FfiGroup) {
val id: ByteArray
get() = libXMTPGroup.id()

val createdAt: Date
get() = Date(libXMTPGroup.createdAtNs() / 1_000_000)

fun send(text: String): String {
runBlocking {
libXMTPGroup.send(
Expand Down

0 comments on commit 88a2c77

Please sign in to comment.