fix(wallet): use proper isDm check for wallet button visibility

The wallet button should only appear in genuine DM rooms. The previous
logic (isDm || activeMembersCount == 2L) was overly broad as it would
show the wallet in any 2-person room, including private rooms that
are not direct messages.

Now uses only roomInfo.isDm which properly checks:
- isDirect flag is true (Matrix spec DM indicator)
- activeMembersCount <= 2 (at most 2 active members)

This ensures the wallet button only appears in real 1:1 DM rooms.
This commit is contained in:
Kayos 2026-03-29 06:57:02 -07:00
parent ee439cb5a3
commit faa6f768f6

View file

@ -295,7 +295,7 @@ class MessagesPresenter(
dmUserVerificationState = dmUserVerificationState,
roomMemberModerationState = roomMemberModerationState,
topBarSharedHistoryIcon = topBarSharedHistoryIcon,
isDmRoom = roomInfo.isDm || roomInfo.activeMembersCount == 2L,
isDmRoom = roomInfo.isDm,
successorRoom = roomInfo.successorRoom,
eventSink = ::handleEvent,
)