From dc0c43c80cd9e06a3e99b94b3dce5a5c98c27c81 Mon Sep 17 00:00:00 2001 From: Tony Olagbaiye Date: Sat, 26 May 2018 19:44:48 +0100 Subject: [PATCH] Decode message formatting in attachment messages --- Makefile | 1 + api/slack-api-message.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ea5d8e..1636a9a 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ slack-emoji.inc: slack-emoji.pl perl slack-emoji.pl > slack-emoji.inc else slack-emoji.inc: slack-emoji.py + pip install requests env python3 slack-emoji.py > slack-emoji.inc endif diff --git a/api/slack-api-message.c b/api/slack-api-message.c index 4ec05f0..f755c19 100644 --- a/api/slack-api-message.c +++ b/api/slack-api-message.c @@ -138,13 +138,15 @@ int slack_api_message_attachment_handle(struct t_slack_workspace *workspace, if (!ptr_user) return 1; /* silently ignore if user hasn't been loaded yet */ + char *message = slack_message_decode(workspace, text); weechat_printf_date_tags( ptr_channel->buffer, (time_t)atof(ts), "slack_message", _("%s%s"), "++\t", - text); + message); + free(message); return 1; }