-
Notifications
You must be signed in to change notification settings - Fork 45
Large Telegram messages should go on pastebin #56
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
Comments
For future reference when this gets worked on, we can use Fedora's Pastebin. They have a well-documented API to work with: |
@Tjzabel It is also worth noting that paste.fp.o is ephemeral. Pastes will eventually expire and be deleted. We should consider if this is something we are okay with or if persistent pastes are important. I lean towards wanting persistence. |
@jwflory it's worth noting that while paste.fp.o is generally ephemeral, there is an option to set no expiry date when uploading through their API. |
With that being said, do we want to have an ENV option to set a length of time for the paste to be active for? Or do we just want this to never expire. |
@Tjzabel Oh, actually yes! I like giving this option to the user, maybe with a default value of a 90-day expiration. |
This ticket was pushed to the backlog for now. This could be a good candidate for a v1.5 sprint. In the meanwhile, sprint development time will not be allocated to this ticket for now. If someone in the community wanted to work on this or make a contribution, this would be an excellent place to start! 🎉 |
WWeeelllll, it looks like paste.fp.o is being retired in favor of another solution. It may not be a good idea at this point to create this feature surrounding that platform. |
Hastebin is another reliable favorite. You can send txt documents directly to their backend for easy uploads. |
I would like to work on it. |
I think because this was associated to the So, we could use the CentOS pastebin API.
Awesome, thanks for your interest @nasirhm! 🙌 How are you thinking to approach the implementation? Any thoughts? |
I'm setting up the development environment first, after that would try to go through the code and on the approach to implement this is what i think:
It's a pretty basic abstraction of how I would approach the problem. What do you think ? |
@nasirhm This is good. Initially I was thinking it would be better to count the number of characters up to the max message length permitted for IRC. I think Does this explanation make sense? Curious what other @RITlug/teleirc-developers-commit-access folks think. |
I think the irc message size limit is around 510 characters + 2 command characters. anything bigger definite should be a pastebin. I often have multiline replies on telegram, and doesn't seem appropriate to auto-assume a pastebin for new lines. like this reply is 321 characters, i think is fine without a pastebin |
I've got the idea of what to implement, Thanks @jwflory and @kennedy For utilizing CentOS Paste : We would require an API_KEY to create the paste and i am unable to find a way to generate the API Key. Any other pastebin service with a decent API would work wonders too. What do you guys think ? |
@nasirhm Looks like there might be a single key used across the entire CentOS Pastebin Service (see here). I don't think we want all of our users to ask Fedora Infrastructure for the single key… So, any other service is fine. I think it is a requirement that it be an open source pastebin tool with self-hosting options, for other downstream TeleIRC users. This way, they could also configure a different base URL if a downstream TeleIRC User wanted to use their own internally-hosted Pastebin Service. |
@nasirhm hello! I reworded this issue to specify large TG messages. What we did in the previous iterations of TeleIRC is made all newlines within a TG message still fall under the same IRC message, so that way a 5-line TG message still gets sent to IRC as a single message. Additionally, we had a maximum message limit, and split out large messages that went over this limit into separate messages. As we don't currently have this feature implemented in Golang (v2.0+), we can turn this issue into two parts:
These two points would be separate blocks of work (and thus separate issues/PRs), but would ultimately work together. Thoughts? |
+1, I am on board. 😄 |
@jwflory /me is working on it now. |
This seems to be too complicated for a "good first issue" as listed in https://fedoraproject.org/easyfix/ please consider removing it. |
I don't agree, this isn't that insanely complex. It requires knowledge of how both Telegram and IRC work and then it's a matter of checking the message length and making a request to a pastebin service via an API. |
IMHO this is PERFECT for Hacktoberfest. Hacktoberfest is about getting good quality PRs and this is good for that. |
IRC users get annoyed when one Telegram user posts a codeblock or just a multiline message.
It should be configurable that
preformatted multilined text
and any other text with >n carriage returns/newlines automatically are turned into a pastebin to be linked to in the IRC.see also: FruitieX/teleirc#249
The text was updated successfully, but these errors were encountered: