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

Better handling for long links posts [reddit.js] #104

Open
HigherFive opened this issue Mar 21, 2015 · 1 comment
Open

Better handling for long links posts [reddit.js] #104

HigherFive opened this issue Mar 21, 2015 · 1 comment

Comments

@HigherFive
Copy link
Collaborator

[20:17:38] [AnimeFigures] [Fud_3] Anyone Think This Is Legitimate? [ https://reddit.com/2ztr91 ] [
[20:17:39] http://m.ebay.com/itm/221589440833?lpid=82&chn=ps&ul_ref=http%253A%252F%252Frover.ebay.com%253A80%252Frover%252F1%252F711-117182-37290-0%252F2%253Fmtid%253D1588%2526kwid%253D1%2526crlp%253D53601919689_324272%2526itemid%253D221589440833%2526targetid%253D87946122849%2526rpc%253D0.13%2526rpc_upld_id%253D44904%2526device%253Dm%2526mpre%253Dhttp%25253A%25252F%25252Fwww.ebay.com%25252Fitm%25252Flike%25252F221589440833%25253Flpid%25253D82%252526chn%
[20:17:40] Dps%2526adtype%253Dpla%2526gclid%253DCjwKEAjwrbSoBRDok47Sv6Ci80wSJABFUszTm7t_4YQ6ijhW8KyJfkDnGA7kW4UkFrNepf5Y21wfJRoCFWrw_wcB%2526srcrot%253D711-117182-37290-0&ul_ref=http%3A%2F%2Frover.ebay.com%3A80%2Frover%2F1%2F711-117182-37290-0%2F2%3Fmtid%3D1588%26kwid%3D1%26crlp%3D53601919689_324272%26itemid%3D221589440833%26targetid%3D87946122849%26rpc%3D0.13%26rpc_upld_id%3D44904%26device%3Dm%26mpre%3Dhttp%253A%252F%252Fwww.ebay.com%252Fitm%252Flike%252F2
[20:17:41] 440833%253Flpid%253D82%2526chn%253Dps%26adtype%3Dpla%26gclid%3DCjwKEAjwrbSoBRDok47Sv6Ci80wSJABFUszTm7t_4YQ6ijhW8KyJfkDnGA7kW4UkFrNepf5Y21wfJRoCFWrw_wcB%26srcrot%3D711-117182-37290-0 ]

Currently, we have no restrictions as to what length messages are and it seems like whatever limit reddit has is nowhere near the limit of IRC messages (512 characters). Whatever is longer than that gets split into pieces by the IRC module.
I suggest when we get a link that is overly long, we omit it and say so (with the link to the reddit post itself remaining). Another possible solution is to use a link shortener the same way we do for source links.

Also consider applying some sort of hard limit to message length in bot.js

@Sebmaster
Copy link
Collaborator

What if we implement link shortening if we'd exceed the max message limit?

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

No branches or pull requests

2 participants