Skip to content

Commit

Permalink
Fix not being able to send cards to other rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaelor committed Oct 15, 2017
1 parent 82ba69a commit 7ccb615
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mattermost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ccb615

Please sign in to comment.