diff --git a/mattermost.py b/mattermost.py index 68eb8a3..c4aa0c6 100644 --- a/mattermost.py +++ b/mattermost.py @@ -392,6 +392,10 @@ def send_card(self, card: Card): 'attachments': [attachment] } + if card.to: + if isinstance(card.to, MattermostRoom): + data['channel'] = card.to.name + try: log.debug('Sending data:\n%s', data) # We need to send a webhook - mattermost has no api endpoint for attachments/cards