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

Decide the policy regarding large messages #139

Open
Minoru opened this issue Jul 20, 2021 · 1 comment
Open

Decide the policy regarding large messages #139

Minoru opened this issue Jul 20, 2021 · 1 comment

Comments

@Minoru
Copy link
Member

Minoru commented Jul 20, 2021

This stems from a small discussion we had in Codingteam. Key points are:

  • in Matrix, it's normal to send large, multi-line messages. The protocol natively supports Markdown, and clients usually "fold" large messages, so it's pretty convenient;
  • in XMPP, large messages are traditionally frowned upon. Code should be posted to pastebins.

I have a couple ideas on how to resolve this mismatch:

  1. when translating large messages from Matrix to XMPP (and possibly Telegram), keep the first few lines, and pack the rest into a pastebin link. As ForNeVeR points out, this requires us to run a pastebin service :)
  2. translate the message as-is, but send the author a private message explaining the situation and asking to keep their message lengths in check. ttldtor points out that the author might have blocked the bot, and will not see the message
@ForNeVeR
Copy link
Member

Okay, here's what I would propose.

  1. Yes, implement our small pastebin-like service. It should be able to store a big text in its database, and respond with it in HTML format (applying the guessed or optionally user-suggested highlighting scheme).
  2. There will be two write entrypoints in the service:
    • automatic creation of pastes from big pasted texts from Telegram (and Matrix in future), where the "pasted text" is detected from the markup (it is a more or less usual thing to paste big texts in both Telegram and Matrix, while marking them up properly using the formatting features)
    • manual paste creation via the bot private messages
  3. If the paste is created automatically, then the link to the paste should be sent to XMPP instead of its content.
  4. If the paste was created manually (via private messages), then send the message link to the paste author.
  5. There should be an admin interface to check paste download counts, contents and authorship, and to delete pastes (to prevent abuse).
  6. We should warn the users that the pastes aren't private.

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

No branches or pull requests

2 participants