Skip to content

Conversation

@FloatingMilkshake
Copy link
Collaborator

Closes #90

Automatically dehoists members when they are muted, and undehoists them when they are unmuted (only if they would not be immediately auto-dehoisted again / if their name does not start with a hoisting character after the dehoist character). When undehoisting, the member's nickname is just cleared if it is the same as their global display name (or username if their display name is not set).

Logged to the Audit Log with reasons [Automatic dehoist on mute] and [Automatic undehoist on unmute].

// can be safely removed internally.
await Program.redis.HashDeleteAsync("mutes", targetUser.Id);

// attempt to undehoist member if they should not otherwise be hoisted
Copy link
Owner

@Erisa Erisa Oct 3, 2025

Choose a reason for hiding this comment

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

This doesn't handle manual dehoists, like:

  1. dehoist user
  2. mute user
  3. unmute user
    and it undehoisted them, but it shouldn't do that if they were manually dehoisted before the mute. This might require storing extra data to track manual dehoists?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This might require storing extra data to track manual dehoists?

This is a bit tricky—storing a flag on !dehoist is easy, but then we don't have an !undehoist and the way to actually undehoist is to just change a member's nickname & remove the dehoist character

I suppose we would want to check their nickname on Member Update, and unset the flag if their nickname previously had the dehoist character (so, if the flag was set) but no longer does?

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for adding permadehoist tracking, that's a good start.

I suppose we would want to check their nickname on Member Update, and unset the flag if their nickname previously had the dehoist character (so, if the flag was set) but no longer does?

Yeah if they change from a name with the character to one without the character we can remove it.

If this is impossible or too hard I'm happy to leave as-is and say that anyone who cares about this should use permadehoist instead.

Copy link
Owner

@Erisa Erisa left a comment

Choose a reason for hiding this comment

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

With permadehoist, the remaining review conversation is optional, merge with or without depending how hard it is.

@github-project-automation github-project-automation bot moved this from Awaiting review to Approved in Cliptok todo Oct 14, 2025
@FloatingMilkshake FloatingMilkshake merged commit c35de08 into main Dec 2, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Approved, awaiting merge to Done in Cliptok todo Dec 2, 2025
@FloatingMilkshake FloatingMilkshake deleted the milkshake/mute-autodehoist branch December 2, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Todo: dehoist muted people and undehoist unmuted people

2 participants