Mejorado Internal

Pages check Sent to you with one question

The account menu checks whether anything was sent to you with one query on every page, and no longer reads everything in full when it all came from your own teams.

SentToYou::hasAny(), which the account menu asks on every member page, asked each of nine areas separately and, for an account with anything connected, read every area in full, only to leave out rows from the account's own teams (a seller who bought from their own Store). Each area now names its rows' teams in a query (SentToYouTeams), joined into one statement; only a row from a team where the account cannot use the area itself, or from an area no team holds, leads to the full read, where the hold decides. A signed document kept after its request or team was deleted is named as team 0, as the list names it. Each area's tests check its query names the team of every row it lists.