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

Discord: Split messages if necessary #2124

Merged
merged 3 commits into from May 23, 2024

Conversation

BenWiederhake
Copy link
Contributor

Old behavior: Telegram user sends a huge 4096-byte message (the maximum permitted by Telegram), it gets clipped to 1950 bytes on Discord.

New havior: Set MessageSplitMaxCount=3 as config option of the Bridge, and it instead sends up to three messages to Discord (each of maximum length)

Note that this handles editing correctly, both in the "bot user" and "webhooks" cases.

This PR combines well with #2123.

I have no write permissions to the wiki, so I cannot add the appropriate documentation there.

bridge/discord/webhook.go Outdated Show resolved Hide resolved
@BenWiederhake
Copy link
Contributor Author

Changes since last push: Refactored Bdiscord.webhookSend as suggested by the codeclimate bot.

Copy link

codeclimate bot commented Mar 7, 2024

Code Climate has analyzed commit a91a14c and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@42wim
Copy link
Owner

42wim commented May 23, 2024

@BenWiederhake thanks for looking into this and adding tests 👍
The wiki has set readonly because of spammers. I've invited you to the matterbridge/wiki on https://github.com/matterbridge/wiki/wiki if you want you can updated the wiki there (and will be synced to the wiki here also)

@42wim 42wim merged commit 4bf1c04 into 42wim:master May 23, 2024
@42wim 42wim added this to the 1.27.0 milestone May 23, 2024
@BenWiederhake
Copy link
Contributor Author

Awesome! It's good that you're back, I already got worried :)

@BenWiederhake BenWiederhake deleted the dev-discord-split branch May 24, 2024 15:52
@BenWiederhake
Copy link
Contributor Author

BenWiederhake commented May 24, 2024

Hmm, I can edit neither of the wikis, and I don't see an invitation notification. :(

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.

None yet

2 participants