Skip to content

feat(webhook): add user IDs for requestedBy, reportedBy, commentedBy - #3208

Closed
lumaa-dev wants to merge 3 commits into
seerr-team:developfrom
lumaa-dev:develop
Closed

lumaa-dev wants to merge 3 commits into
seerr-team:developfrom
lumaa-dev:develop

Conversation

@lumaa-dev

@lumaa-dev lumaa-dev commented Jun 28, 2026 •

Copy link
Copy Markdown

Description

  • Added keys requestedBy_id, reportedBy_id, commentedBy_id that map to the user ID in the WebhookAgent's KeyMap
  • Fixed typo in webhook documentation (previously requesting user... in the reporting section, now reporting user...)

Allows to identify users without using displayName or email, which can be changed at any time, and can be similar to another user. This is also made for non-Jellyfin user accounts.

No AI tools have been used for this PR

How Has This Been Tested?

This has not been tested, only successfully built using pnpm build (as mentionned in Checklist)

Screenshots / Logs (if applicable)

Note

Screenshots are not related to Seerr itself, but to a webhook server running SeerrAPN

On this first attachment, we can see the current way to check which user requested a media, from a list of seerrUsernames. This can conflict if two users have the same display name, which is not the intended behavior.

SCR-20260628-lsty\

Screenshot of SeerrAPN

On this second screenshot, we also check which user requested a media, from a list of seerrIds. Seerr user IDs is required so targetted notifications are sent to the right user, since there cannot be two users with the same ID.

SCR-20260628-llwl\

Screenshot of SeerrAPN, if the PR is merged

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

  • New Features
    • Added user ID template variables to webhook notifications for requests, reports, and comments.
    • Webhook payloads can now include requestedBy_id, reportedBy_id, and commentedBy_id placeholders.
  • Documentation
    • Updated webhook docs to include the new ID variables.
    • Corrected the issue-related variable descriptions to reference the reporting user.

@lumaa-dev
lumaa-dev requested a review from a team as a code owner June 28, 2026 11:13
@coderabbitai

coderabbitai Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 165be22f-3585-4925-917b-56143d22026a

📥 Commits

Reviewing files that changed from the base of the PR and between ebac489 and 9787da0.

📒 Files selected for processing (3)
  • docs/using-seerr/notifications/webhook.md
  • server/lib/notifications/agents/webhook.ts
  • src/components/Settings/Notifications/NotificationsWebhook/index.tsx

📝 Walkthrough

Walkthrough

Three new webhook template variables—{{requestedBy_id}}, {{reportedBy_id}}, and {{commentedBy_id}}—are added to the backend KeyMap, the frontend defaultPayload, and the webhook documentation tables. A description correction for reportedBy_* fields in the Issue section is also included.

Changes

Webhook User ID Template Variables

Layer / File(s) Summary
Backend KeyMap mappings
server/lib/notifications/agents/webhook.ts
Adds requestedBy_id, reportedBy_id, and commentedBy_id entries to KeyMap, resolving to request.requestedBy.id, issue.createdBy.id, and comment.user.id respectively.
Frontend default payload and docs
src/components/Settings/Notifications/NotificationsWebhook/index.tsx, docs/using-seerr/notifications/webhook.md
Inserts the three new ID fields into defaultPayload and documents them in the Request, Issue, and Comment variable tables; also corrects reportedBy_* descriptions to reference the reporting user.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • gauthier-th
  • fallenbagel
  • 0xSysR3ll

Poem

🐇 Hop hop, a new ID in sight,
The webhook now knows who's reporting tonight.
requestedBy_id, commentedBy_id too,
No more mystery of who did what to who.
The rabbit stamps docs and ships it with glee! 🎉

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding user ID fields for webhook requester, reporter, and commenter payloads.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seerr-automation-bot seerr-automation-bot added this to the v3.4.0 milestone Jun 28, 2026
@M0NsTeRRR

Copy link
Copy Markdown
Member

Hello,

We won’t merge this PR because improvements in seerr-team/seerr#2039 will already allow you to achieve the same functionality with custom webhook template and full access to seerr object.

@M0NsTeRRR M0NsTeRRR closed this Jul 3, 2026
@seerr-automation-bot seerr-automation-bot removed this from the v3.4.0 milestone Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants