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

Push rules should not be triggered if trigger is inside spoiler #16

Closed
HarHarLinks opened this issue Feb 2, 2022 · 3 comments · Fixed by matrix-org/matrix-spec-proposals#3952
Labels
A-Push enhancement A suggestion for a relatively simple improvement to the protocol

Comments

@HarHarLinks
Copy link
Contributor

Suggestion
This should not be happening: element-hq/element-web#20847

@HarHarLinks HarHarLinks added the enhancement A suggestion for a relatively simple improvement to the protocol label Feb 2, 2022
@richvdh richvdh added the A-Push label Feb 2, 2022
@ShadowJonathan
Copy link
Contributor

For comparison, discord and telegram also don't seem to care if a mention is spoilered or not.

@HarHarLinks
Copy link
Contributor Author

I realize this suggestion would add some metadata and implementation "overhead".

Spoilers seem to be implemented using the <span data-mx-spoiler> tag. My argument is, if you wanted to ping outside of that, you'd just put the pill outside of that tag when composing your message?

@ShadowJonathan
Copy link
Contributor

Hmmm, I think this is tricky to implement, as else you'll have to scan and consider both HTML and (implicit on `body') markdown syntax before you fire such a push rule, which can get fragile and hacky quickly.

I'm currently working on MSC3517, which is already dealing with this with pills by themselves, however, I'm planning to add an MSC which delegates "explicit mentions" to an array (with extensible events), so that a client can choose which "pills" in the message will eventually ping the user(s) or not.

This would address your issue, but kick it back to clients to adhere to it, personally I think it's hard to answer from the spec position, as it's not clear-cut which approach is better. (They have to balance spec implementation complexity as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Push enhancement A suggestion for a relatively simple improvement to the protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants