sopython-site icon indicating copy to clipboard operation
sopython-site copied to clipboard

Prevent spoiler app from generating links too long to be pasted in chat

Open wimglenn opened this issue 8 years ago • 5 comments

Preferably, integrate a hastebin or similar (so the link can be short no matter the paste length).

wimglenn avatar Jan 18 '18 20:01 wimglenn

I didn't do short links to avoid storing the data in the database and to avoid very long spoilers. Do you know what the length limit of chat messages is?

davidism avatar Jan 18 '18 20:01 davidism

500 chars

wimglenn avatar Jan 18 '18 20:01 wimglenn

I can at least put an error message in if the encoded data and default message exceeds that.

davidism avatar Jan 18 '18 21:01 davidism

Well, that would be better than nothing. Can probably find a better encoding than base64 without too much effort.

wimglenn avatar Jan 18 '18 21:01 wimglenn

qntm did some work on that: https://qntm.org/twitcodings, although I don't think most other encodings are URL safe.

davidism avatar Jan 18 '18 22:01 davidism