Repository navigation
Conversation
Return a ChatInfo for each chat, containing the own addresses used in the chat besides the counterpart and the unread flag. This allows the UI to hide messages received on certain own addresses, e.g. used by other SBBS tools (BeamMW/beam-ui#1253). Also fix the unread flag, which was computed over all the instant messages of the wallet instead of the messages of the chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed for BeamMW/beam-ui#1253.
Summary
IWalletDB::getChats()now returns aChatInfoper chat: the counterpart, the unread flag and the own addresses (mySbbs) used in the chat. This lets the UI hide chats with messages received on certain own addresses, e.g. addresses used by other SBBS tools like PriviMe, which clutter the Beam Messenger.WalletClient::onGetChatList()receivesstd::vector<ChatInfo>accordingly. It's only overridden in beam-ui.SELECT count(*) FROM IM WHERE is_read = 0, i.e. over all instant messages of the wallet, so a single unread message marked every chat as unread. It's now computed per chat.Test plan
TestChatsinwallet_db_test: grouping by counterpart, own addresses per chat, per-chat unread flagwallet_db_testbuilt and passed locally (macOS, AppleClang)🤖 Generated with Claude Code