Skip to content

Use webhooks to mirror status updates with member identity#102

Open
AadarshM07 wants to merge 2 commits intoamfoss:developfrom
AadarshM07:issue#101
Open

Use webhooks to mirror status updates with member identity#102
AadarshM07 wants to merge 2 commits intoamfoss:developfrom
AadarshM07:issue#101

Conversation

@AadarshM07
Copy link

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

  • Fetches member avatar using their discord_id
  • Send updates using webhook with member username and avatar
  • Removed embed-based status update messages

References

Closes #101

Manual verificationwas performed in my local testing environment

Copilot AI review requested due to automatic review settings March 7, 2026 10:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id and uses it when sending mirrored updates.
  • Replaces embed-based mirroring with webhook content messages.

💡 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.

Comment on lines +84 to +86
if let Some(discord_id) = &member.discord_id {
let discord_id: u64 = discord_id.parse()?;

Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Member

@hrideshmg hrideshmg Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

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.

Use webhooks to mirror status updates with member identity

3 participants