• Jesse Hallam's avatar
    ABC-214: fix permalinks to direct messages (#720) · 31c3c861
    Jesse Hallam authored
    This simplifies the changes introduced in ABC-160 to simply check that
    the channel exists instead of also checking that the channel team id
    matches the current team. The additional check was redundant, since the
    set of channels available are already constrained to the current team;
    it was also wrong, since direct messages and group messages aren't
    actually assigned team ids, leading to the regression in question.
    
    Note that this check (before and even now) only works if you have access
    to the two teams in question. If you try to open a malformed permalink
    referencing a team for which you don't have access or that doesn't
    exist, none of the router code in <NeedsTeam> executes (team is null),
    and a different path is executed that doesn't try to evaluate the
    permalink. Fixing that appears to be non-trivial and out of scope for
    this change.
    31c3c861
global_actions.jsx 16 KB