Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Bridge limitation warnings #4642

Closed
wants to merge 4 commits into from
Closed

Bridge limitation warnings #4642

wants to merge 4 commits into from

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented May 26, 2020

Fixes matrix-org/matrix-appservice-irc#701

Paired with matrix-org/matrix-appservice-irc#1057

Example of the popover:
alertv2

Example of the new settings page details:

image

This feature looks at the bridge state event(s) for a room, and then checks limitations described in those events against the message content a user is about to send. The objective is to avoid matrix users sending messages that are incompatible or badly represented in a bridge rather than mangling the format on the bridge and upsetting remote users.

This PR currently fixes one problem: Matrix users send long messages which the IRC bridge is forced to store in a pastebin, rather than sending over the wire as IRC traditionally dislikes long messages.

There will be an extension MSC coming soon to cover the new keys added to MSC2346.

In terms of what's left to do:

  • Limit users ability to send messages that breach limitations (N/A - I don't think we want this)
  • Allow users to permanently disregard the warning (N/A - we no longer block the user from sending)
  • Highlight the limitations in the bridge settings tab

@t3chguy
Copy link
Member

t3chguy commented May 26, 2020

What about reactions/edits/redactions? Shouldn't they warn too?

@Half-Shot
Copy link
Contributor Author

What about reactions/edits/redactions? Shouldn't they warn too?

Yep, this is just a first pass. Once there is general happiness noises from product/design about the idea of a bridge interrupting your messaging, I'll want to add limitation categories for event types.

@t3chguy
Copy link
Member

t3chguy commented May 26, 2020

Matrix users send long messages which the IRC bridge is forced to store in a pastebin, rather than sending over the wire as IRC traditionally dislikes long messages.

The copy in the dialog doesn't explain that this is what would happen if they ignore the warning.

@Half-Shot
Copy link
Contributor Author

The copy in the dialog doesn't explain that this is what would happen if they ignore the warning.

Yeah, this is a sore point. The IRC bridge can't send it's own warnings because they will appear as English in the client, and I want to keep the ability for i18n. Riot however doesn't know about the pastebin aspect, unless we stick some sort of key into the event content to state this.

I was tempted to have a "consequeneces": ["pastebin"] and leave it up to Riot to translate that to words, but I think it's a bit too bridge specific to spec. The one thing we could do is a "consequeneces": ["org.matrix.appservice-irc.pastebin"] and Riot would know to translate irc bridge specific issues into words.

Alternative solutions I might have missed v.welcome though :)

@ptman
Copy link
Contributor

ptman commented Jun 8, 2020

I'm sure you've already covered splitting long messages (splitlong.pl & similar), but where?

@Half-Shot
Copy link
Contributor Author

I'm sure you've already covered splitting long messages (splitlong.pl & similar), but where?

We've not covered line splitting on the client-side. This a deliberately dumb metric that counts characters to give a rough warning. I'm not sure how best to factor in line splitting as a warning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Long messages" are annoying; prefer to disallow entering them on the Matrix UI
4 participants