websages/tumble — pull request #2 by stahnma (2014-03-24 06:44:00+00:00)
Title: Display images

There are 3 commits here.

1. Fix up CRLF because WTF.
2. Change shebangs to /usr/bin 100% of the places, since it wasn't consistent.
3. The real commit.

Allow images to be shown inline for tumble.

Prior to this commit any link added to tumble via the web api (as used by chat bots) would be simple text displayed on tumble. This seemed ineffective for links that were directly to images.

This commit makes changes to the way ircLinks are processed. The headers are now stored in the database and we can take action on them. In this case, if the header matches 'image', the tumble web renderer will attempt to render it as an image, while still ircLinking to the original item.

The downsides to this could be that NSFW links would now be inlined.

To enable this feature, you also must run a migration on the database.

alter table ircLink add column content_type varchar(40);