Skip to content

Commit

Permalink
add back the consent piece
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Dec 16, 2024
1 parent 8bef5ec commit 86309f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/src/main/java/org/xmtp/android/library/Dm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ class Dm(val client: Client, private val libXMTPGroup: FfiConversation) {
}

fun prepareMessage(encodedContent: EncodedContent): String {
if (consentState() == ConsentState.UNKNOWN) {
updateConsentState(ConsentState.ALLOWED)
}
return libXMTPGroup.sendOptimistic(encodedContent.toByteArray()).toHex()
}

Expand Down
3 changes: 3 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 @@ -97,6 +97,9 @@ class Group(val client: Client, private val libXMTPGroup: FfiConversation) {
}

fun prepareMessage(encodedContent: EncodedContent): String {
if (consentState() == ConsentState.UNKNOWN) {
updateConsentState(ConsentState.ALLOWED)
}
return libXMTPGroup.sendOptimistic(encodedContent.toByteArray()).toHex()
}

Expand Down

0 comments on commit 86309f5

Please sign in to comment.