-
Notifications
You must be signed in to change notification settings - Fork 631
Support breaking message body size into parts for Slack attachments. #1118
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
Conversation
|
This pull request is in response to an issue raise for the err-stackstorm plugin. fmnisme/err-stackstorm#16 |
Since the message may be posted in languages other than English, I think it'd be better to format the part as `[x/y]` rather than `[x of y]`.
|
@nzlosh this looks like a sane approach to me, I'd be happy to merge it. To help me verify this works correctly before I merge it though, could you possibly show me a minimal example plugin which:
That way I can easily run it against a slack instance and see the behavior for myself. |
|
@zoni I've written a simple plugin that will allow you test the multi-part message for cards. You can find the code here. https://gist.github.com/nzlosh/8230a9c41cdfb5d59df5845a390840dc |
|
Something I noticed when testing was to post to |
|
I just saw the log in errbot's output: The channel is seen as |
|
@zoni Did the gist example allow you test this PR? |
|
Only a severe lack of time/energy on my part, for which I apologize. I'm going to try looking at this real soon. Please pester me again if I haven't gotten back to you on this in a week's time. |
|
I finally got around to looking at this, and can confirm it works as intended. My apologies for not getting to it sooner. I'll merge this in now, the build failure should resolve itself as the cause of that has since been fixed on master. Thanks! |
…1118) Since the message may be posted in languages other than English, I think it'd be better to format the part as `[x/y]` rather than `[x of y]`.
The slack backend already splits up large messages into
MESSAGE_SIZE_LIMITfor thesend_messagemethod. This patch uses the same logic for thesend_cardmethod.