Quantcast
Channel: Mattermost Discussion Forums - Latest posts
Viewing all articles
Browse latest Browse all 25778

Posts with attachments and desktop notifications ("... did something new")

$
0
0

Hi there!

I am trying to develop a little integration. I have been using attachments (https://docs.mattermost.com/developer/message-attachments.html) in order to have a message with a green, red or blue border at the left side. Just as in the examples on the linked page, I have a post that consists only of an "attachment". I have a "text" and a "fallback" field within my attachment and everything looks good, except the notifications: My Desktop Client notifications don't use the "fallback" text but instead say " did something new". At the message's top level, I don't want a text to be defined, but I tried a "fallback" field at this level which is ignored.

My message payload looks as follows:

payload = {
    'channel'  : 'off-topic',
    'username' : 'I am a bot',
    'fallback' : 'this is the fallback text', # this is ignored...?
    'attachments': [
        {
            'text' : '**formatted** _text_',
            'fallback' : "fallback unformatted text message",
            'color': '#1A9D01',
            'title': 'Super Important Notification',
            'title_link': 'http://google.com',
        }
    ]
}

Any idea on how to achieve this correctly?

Thanks

Christian


Viewing all articles
Browse latest Browse all 25778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>