Use webhooks to mirror status updates with member identity#102
Use webhooks to mirror status updates with member identity#102AadarshM07 wants to merge 2 commits intoamfoss:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the status update mirroring task to post messages via Discord webhooks so mirrored updates appear with member identity details (username/avatar) instead of bot-sent embeds.
Changes:
- Adds webhook creation/reuse logic per status update channel.
- Fetches the Discord user avatar from a stored
discord_idand uses it when sending mirrored updates. - Replaces embed-based mirroring with webhook
contentmessages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| if let Some(discord_id) = &member.discord_id { | ||
| let discord_id: u64 = discord_id.parse()?; | ||
|
|
There was a problem hiding this comment.
This now silently skips mirroring when member.discord_id is None, which is a behavior change from the previous implementation (updates were still mirrored). Consider adding an else fallback (e.g., send via webhook with a default avatar / bot identity) and/or logging so missing IDs don’t cause updates to disappear.
There was a problem hiding this comment.
@AadarshM07 this needs to be addressed. The discord IDs are only populated when the member signs into home and fills them in manually, they might forget and its not obvious if they do.
Description
This updates the status update mirroring to use Discord webhooks instead of bot embeds, the status updates are sent impersonating the member, making it easier to recognize.
Changes
References
Closes #101
Manual verificationwas performed in my local testing environment