Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions hypchat/restobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def message(self, message):
data = {'message': message}
self._requests.post(self.url + '/message', data=data)

def notification(self, message, color=None, notify=False, format=None):
def notification(
self, message, color=None, notify=False, format=None, label=''):
"""
Send a message to a room.
"""
Expand All @@ -156,9 +157,16 @@ def notification(self, message, color=None, notify=False, format=None):
format = 'text'
else:
format = 'html'
data = {'message': message, 'notify': notify, 'message_format': format}

data = {
'message': message,
'notify': notify,
'message_format': format,
'from': 'labe'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be 'from': 'label'} instead.


if color:
data['color'] = color

self._requests.post(self.url + '/notification', data=data)

def topic(self, text):
Expand Down