A DM the relay just created cannot be in an older visibility snapshot,
so reading it only adds a way to report failure after the DM exists.
Check visibility only when the relay reports a reopen.
Signed-off-by: Tom Brow <tomb@block.xyz>
Reopening a hidden DM unhides it, but the relay accepts the open even
when publishing that visibility snapshot fails. The fast open path now
reads the caller's visibility snapshot alongside the DM's metadata and
roster and fails if the DM is still hidden, so the sheet shows an error
and Done can retry instead of opening a DM the sidebar keeps hidden.
Signed-off-by: Tom Brow <tomb@block.xyz>
findJoinedChannel asked for kinds 39000 and 39002 under one limit of 2.
A channel with lingering pre-backfill metadata revisions could fill that
limit with metadata and drop the roster, so reopening an older DM would
fail after the relay had already opened it. Query each kind with its own
limit of 1, in parallel.
Signed-off-by: Tom Brow <tomb@block.xyz>
openDm reloaded every membership, profile, and latest message before
returning, so the New message sheet's spinner could run for many seconds
on a large account or slow connection. Interactive opens (New message,
Search, profile) now open the DM from its own metadata and roster and
reconcile the channel list in the background, as Solo chat creation
already does. Hidden-DM resurfacing keeps waiting for the list, which
is what clears its hidden state.
Signed-off-by: Tom Brow <tomb@block.xyz>