Skip to content

Commit

Permalink
update the last message returned
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jan 8, 2025
1 parent 6d24e39 commit 24d63fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DmWrapper {
put("consentState", consentStateToString(dm.consentState()))
}
if (dmParams.lastMessage) {
val lastMessage = dm.messages(limit = 1).firstOrNull()
val lastMessage = dm.lastMessage()
if (lastMessage != null) {
put("lastMessage", MessageWrapper.encode(lastMessage))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GroupWrapper {
put("consentState", consentStateToString(group.consentState()))
}
if (groupParams.lastMessage) {
val lastMessage = group.messages(limit = 1).firstOrNull()
val lastMessage = group.lastMessage()
if (lastMessage != null) {
put("lastMessage", MessageWrapper.encode(lastMessage))
}
Expand Down

0 comments on commit 24d63fb

Please sign in to comment.