mattermost-community / mattermost-plugin-memes

Add culture to your Mattermost with memes 🔌
Apache License 2.0
72 stars 32 forks source link

Make memes collapsible #40

Open dylf opened 4 years ago

dylf commented 4 years ago

It would be nice to have the meme images collapsable like media embedded via a link in mattermost. image

image

aconitumnapellus commented 3 years ago

This is doable by not posting the link to the generated image in markdown but only posting the link as it is. IMO this should be opt-in with a configuration switch.

The relevant line is in server/plugin.go on line 201: replace

    Text:         "![" + template.Name + "](" + siteURL + "/plugins/memes-adsy/templates/" + template.Name + ".jpg" + queryString + ")",

with

    Text:         siteURL + "/plugins/memes-adsy/templates/" + template.Name + ".jpg" + queryString,
aconitumnapellus commented 3 years ago

I started to work on it: https://github.com/aconitumnapellus/mattermost-plugin-memes/commits/feature/opt_in_preview