Rewrite plain-text @nick as an IRC highlight - #322
Open
rollecode wants to merge 2 commits into
Open
Conversation
Author
|
Generalized this: the first commit only rewrote a mention opening the message. Second commit strips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Beeper, manually typing
@alice hello(not using the client's mention autocomplete, so no pill, no m.mentions) currently relays to IRC as the literal string@alice helloinstead of the usual IRC highlight conventionalice: hello.This only rewrites the message when the word right after
@matches a nick actually on the channel right now (is_on_channel), so it never invents a mapping for a name that isn't there.Related but distinct from two earlier threads worth reconsidering here:
@from FluffyChat's specific fallback-mention text and got shelved in favor of doing mentions properly once formatted_body/pills were supported (Use formatted_body for message text #102, since closed). This isn't that: there's no pill, no fallback-mention markup at all, just plain manually-typed text, so the "handle it properly via Use formatted_body for message text #102" answer doesn't apply here.Given that, happy to discuss if this should still be opt-in via a room setting, but wanted to raise it since the earlier objections don't seem to carry over directly.