Skip to content

Commit

Permalink
lets just hex this instead of base 64
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 14, 2024
1 parent 3e0d9e3 commit b757522
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ class XMTPModule : Module() {
"group",
mapOf(
"clientAddress" to clientAddress,
"group" to GroupWrapper.encodeToObj(client, group, Base64.encodeToString(group.id, NO_WRAP))
"group" to GroupWrapper.encodeToObj(client, group)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import android.util.Base64.NO_WRAP
import com.google.gson.GsonBuilder
import org.xmtp.android.library.Client
import org.xmtp.android.library.Group
import org.xmtp.android.library.toHex

class GroupWrapper {

companion object {
fun encodeToObj(client: Client, group: Group, id: String): Map<String, Any> {
fun encodeToObj(client: Client, group: Group): Map<String, Any> {
return mapOf(
"clientAddress" to client.address,
"id" to id,
"id" to group.id.toHex(),
"createdAt" to group.createdAt.time,
"peerAddresses" to group.memberAddresses(),
"version" to "GROUP",
"topic" to id
"topic" to group.id.toHex()
)
}

Expand Down

0 comments on commit b757522

Please sign in to comment.