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

Improve plaintext formatting of Matrix messages sent via webhooks #778

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

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Mar 28, 2024

In webhook mode sending messages comes with some limitations,
including us not being able to impersonate users or upload attachements.
This makes us fallback to plaintext relaybot behaviour,
while preserving as much from the original message as possible.

Signed-off-by: Tadeusz „tadzik” Sośnierz [email protected]

Depends on: #776

tadzik added 3 commits March 28, 2024 14:25
Signed-off-by: Tadeusz „tadzik” Sośnierz <[email protected]>
Signed-off-by: Tadeusz „tadzik” Sośnierz <[email protected]>
In webhook mode sending messages comes with some limitations,
including us not being able to impersonate users or upload attachements.
This makes us fallback to plaintext relaybot behaviour,
while preserving as much from the original message as possible.

Signed-off-by: Tadeusz „tadzik” Sośnierz <[email protected]>
@tadzik tadzik requested a review from a team as a code owner March 28, 2024 16:12
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one thought. Also needs a changelog.

@@ -234,6 +234,16 @@ export class SlackHookHandler extends BaseSlackHandler {
return;
}

if (params.token !== room.SlackWebhookToken) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we permit it if no room.SlackWebhookToken exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any situation when this could be true for webhook-bridged rooms? I don't think the bridge will allow you to set them up that way.

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.

2 participants