Mark everything peer_account_id sent account_id read. Rejects on a refusal.
Rejects on a refusal, so a caller can tell nothing was sent.
One thread, newest first, keyset-paged on the message id. An empty page on failure.
Every correspondent across the player's accounts in this app. [] on failure.
Private, one-to-one messages between two accounts in your app. MICA-390.
Built on the shared identity layer
useAccountsreads: every member names the account you are acting as (account_id, one ofuseAccounts().getMyAccounts(appId)) and the one at the other end (peer_account_id). Both live inappId, and every call carries it, so a thread is always within one app.Reads never reject:
threads()answers[]andthread()an empty page on any failure, as every list read in the SDK does. Writes do:sendandmarkReadreject, with aServiceRefusalwhen the server keyed its answer, so a caller can tell that nothing happened.What decides who may message whom
The server, per app. Owning
account_id, the peer being an active account in the same app, no messaging yourself and a block in either direction are checked for every app; whatever else your app needs — "only after a match" — is a policy your app's server half registers. An app with no policy is refused outright, so this hook does nothing until one exists.What an add-on can reach
Only its own app's messages. In a sandboxed frame the shell replaces
appIdwith the frame's own before anything is sent, so naming another app still reads and writes your own. Needs thesocialpermission, the same oneuseAccountsdoes.