Repository navigation
Conversation
Clients pass the t2_ ID from search results when starting a DM, which Reddit's user directory never matches, so every new DM failed with "No Reddit user found". Look t2_ IDs up by profile and keep the directory search for usernames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
1 potential issue found:
↑ Select any checkbox above to have Indent auto-fix the issue
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Found issues (1)Full resultsIndent Review Agent
|
| if err != nil { | ||
| return nil, wrapRedditRespError(err) | ||
| } | ||
| var match *userDirectoryHit |
There was a problem hiding this comment.
⚪️ Nit · Usernames shaped like t2_ IDs no longer resolve through the directory
Any identifier matching t2_[0-9a-z]+ now goes only to GetProfile and skips SearchUsers. Reddit usernames can contain underscores and are case-insensitive, so a real account named like t2_abc typed as u/t2_abc is looked up as an ID. If no account has that ID the user gets 'No Reddit user found', and if one does they get the wrong person. Before this change SearchUsers matched it by display name. Fall back to the directory search when GetProfile returns MNotFound.
Found by Indent Review Agent
Without members, bridgev2 refetched chat info before Reddit had set the new DM's chat type, so room creation failed with a 500 even though the DM was created. Return the user as joined and the other user as invited, with the DM name, when Reddit creates a new DM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clients pass the
t2_ID from search results when starting a DM, which Reddit's user directory never matches, so every new DM failed with "No Reddit user found".t2_IDs are now looked up by profile (usernames still use the directory search), and newly created DMs return their members so bridgev2 doesn't refetch chat info before Reddit sets the chat type, the same 500 as #8. The profile endpoint hasn't been exercised against Reddit yet, so QA should start a DM with someone the account shares no chat with, and this should merge alongside #7.🤖 Generated with Claude Code