"animate me" isn't embedding
Closed this issue · 6 comments
Might have something to do with line 43: cb "#{image.unescapedUrl}#.png"
because #.png seems to be appended on unsuccessful embeds. I would try to fix it but I don't know how to test slackbot locally (or know javascript magic)
😢
The animate me
script is one of the hubot
defaults, wonder if this is different upstream or not
Image me (and mustache me) also don't seem to embed, hm...
I noticed, however, that Slack mobile still embedded everything (but it
doesn't show the animated gifs, just a still image).
On May 29, 2015 9:33 PM, "Michael Peng" notifications@github.com wrote:
Image me (and mustache me) also don't seem to embed, hm...
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
Ah yeah, I noticed as well! Also, hopefully you don't get push notifications from pgbot-test because I kind of messed around with it today, haha. If you do, I'm sorry, oops!!
Also, I think the reason for the extension is that there may be cases in which you need to append the #.png
: in the hubot source code (line 46) there's a method ensureImageExtension
in which hubot appends #.png
if /(png|jpe?g|gif)/i.test(ext)
evaluates to false
.
My best stab at this mind-boggling code is that hubot checks whether there is no extension at the end of a url for whatever reason, and attempts to append .png
if there isn't an image extension. But this seems to be an incorrect implementation anyway, because in that case it shouldn't be appending the hash as well.
Anyway pgbot seems to append it every time in the callback (assuming that's what cb
means in coffeescript).
Edit: actually guntars and I looked at it and it seems to be a Slack problem with embedding potentially. Hm...
Yay! Embedding works again! 👯