From b2d5c9ae0923b49b5fdc6376bb3da30355cdf847 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sun, 17 Mar 2019 15:42:17 -0400 Subject: [PATCH] Slack Notification plugin to honor url format arg --- apprise/plugins/NotifySlack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apprise/plugins/NotifySlack.py b/apprise/plugins/NotifySlack.py index 8a11771b..6a321cc4 100644 --- a/apprise/plugins/NotifySlack.py +++ b/apprise/plugins/NotifySlack.py @@ -44,6 +44,7 @@ from time import time from .NotifyBase import NotifyBase from ..common import NotifyImageSize from ..common import NotifyType +from ..common import NotifyFormat # Token required as part of the API request # /AAAAAAAAA/........./........................ @@ -98,6 +99,8 @@ class NotifySlack(NotifyBase): # The maximum allowable characters allowed in the body per message body_maxlen = 1000 + notify_format = NotifyFormat.MARKDOWN + def __init__(self, token_a, token_b, token_c, channels, **kwargs): """ Initialize Slack Object @@ -233,7 +236,7 @@ class NotifySlack(NotifyBase): 'channel': _channel, 'username': self.user if self.user else SLACK_DEFAULT_USER, # Use Markdown language - 'mrkdwn': True, + 'mrkdwn': (self.notify_format == NotifyFormat.MARKDOWN), 'attachments': [{ 'title': title, 'text': body,