Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various formatting adjustments #1822

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Sep 12, 2024

Formatting-related changes from #1807, including:

  • Better matching IRC conventions when bridging file uploads
  • Changing default reply-to format
  • Replacing "M" letter prefix with "`" when nick starts with an invalid character
  • A fix for Long quotes in replies #1521
  • Sensible handling of self-replies

Credit to @funderscore1

Ferass El Hafidi added 5 commits September 12, 2024 12:06
Usually, IRC users just upload files somewhere and send a bare link,
perhaps with a bit of explanation.

The bridge originally did something like this for files:

	* f_[mtrx] uploaded an image: (20KiB) < https://matrix.org/_matrix/media/v3/download/something/some-other-thing/image.png >

and something like this for code blocks:

	* f_[mtrx] sent a code block: https://matrix.org/_matrix/media/v3/download/something/some-other-thing

That is quite unusual on IRC. This commit changes it to:

	<f_[mtrx]> https://matrix.org/_matrix/media/v3/download/something/some-other-thing/image.png (20KiB)
	<f_[mtrx]> https://matrix.org/_matrix/media/v3/download/something/some-other-thing

Which is more natural.

Signed-off-by: Ferass El Hafidi <[email protected]>
It previously was:

	<f_> hi everyone, what's up? I'm about to migrate some stuff today
	~ a while after ~
	<f_[mtrx]> <f_> "hi everyone,..." <- hi, doing great!

Now it is:

	<f_> hi everyone, what's up? I'm about to migrate some stuff today
	~ a while after ~
	<f_[mtrx]> f_: "hi everyone,..." <- hi, doing great!

Some IRC clients may not create a ping when the nickname is surrounded
with `<` and `>`.

Signed-off-by: Ferass El Hafidi <[email protected]>
starts with an invalid character

Looks more natural to IRC users. IRC users usually add an underscore at
the beginning or a "`".

With that, "M24Hacker[m]" becomes "`24Hacker[m]"

Signed-off-by: Ferass El Hafidi <[email protected]>
When someone sent a message:

	<f_[mtrx]> Hello?

And then replied to their own message:

	<f_[mtrx]> > <@Funderscore:nova.astraltech.org> Hello?
	           Hi?

What would be sent on IRC would either be this:

	<f_[mtrx]> Hello?
	<f_[mtrx]> f_[mtrx]: Hi?

Or:

	<f_[mtrx]> Hello?
	-- a while later --
	<f_[mtrx]> f_[mtrx]: "Hello?" <- Hi?

Both of which are confusing because usually nobody pings themself on
IRC.

This commit treats replies to self differently, and introduces a new
`selfReplyTemplate` config option, so that the reply gets bridged as:

	<f_[mtrx]> <f_[mtrx]> Hello?
	<f_[mtrx]> Hi?

Which is a bit more natural.

Signed-off-by: Ferass El Hafidi <[email protected]>
@tadzik tadzik requested a review from a team as a code owner September 12, 2024 10:13
tadzik and others added 4 commits September 12, 2024 13:06
Signed-off-by: Ferass El Hafidi <[email protected]>
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.

1 participant