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

Commits on Sep 12, 2024

  1. Match IRC conventions when bridging file uploads

    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]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5afb6c7 View commit details
    Browse the repository at this point in the history
  2. config.sample.yaml: change default reply-to format

    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]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a9660fb View commit details
    Browse the repository at this point in the history
  3. src/irc/BridgedClient.ts: replace "M" letter prefix with "`" when nick

    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]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    51ecb5c View commit details
    Browse the repository at this point in the history
  4. src/bridge/MatrixHandler.ts: add s modifier to REPLY_REGEX

    Fixes #1521
    
    Signed-off-by: Ferass El Hafidi <[email protected]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    e50005f View commit details
    Browse the repository at this point in the history
  5. src/bridge/MatrixHandler.ts: handle replying to self

    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]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    9c083d8 View commit details
    Browse the repository at this point in the history
  6. spec/: fix tests to match previous changes

    Signed-off-by: Ferass El Hafidi <[email protected]>
    tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    e8e2429 View commit details
    Browse the repository at this point in the history
  7. spec/integ/matrix-to-irc: add test for self-reply

    Signed-off-by: Ferass El Hafidi <[email protected]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    690dcc3 View commit details
    Browse the repository at this point in the history
  8. changelog

    Signed-off-by: Ferass El Hafidi <[email protected]>
    tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5cebd5e View commit details
    Browse the repository at this point in the history
  9. config.sample.yaml: update outdated comment

    Signed-off-by: Ferass El Hafidi <[email protected]>
    Ferass El Hafidi authored and tadzik committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    4bb409e View commit details
    Browse the repository at this point in the history