|
|
@@ -63,6 +63,8 @@ SlackHistory.prototype.messageFactory = function(ev, ts) {
|
|
|
});
|
|
|
if (ev["attachments"]) ev["attachments"].forEach(attachment => {
|
|
|
const slackDomainUri = "https://files.slack.com/";
|
|
|
+ if (attachment.color && attachment.color.length === 6)
|
|
|
+ attachment.color = '#' +attachment.color;
|
|
|
if (attachment.image_url && attachment.image_url.startsWith(slackDomainUri)) {
|
|
|
attachment.remote_image_url = attachment.image_url;
|
|
|
attachment.image_url = "api/serviceImage?team=" +encodeURIComponent(this.ctx.data.team.id) +"&path=" +encodeURIComponent(attachment.image_url.substr(slackDomainUri.length));
|