Modified message color default behavior.

This commit is contained in:
aboron 2016-07-08 16:24:26 -04:00
parent ed2f87f57b
commit f040d897a7
2 changed files with 5 additions and 3 deletions

View file

@ -213,7 +213,7 @@ _CONFIG_DEFINITIONS = {
'HTTP_ROOT': (str, 'General', ''), 'HTTP_ROOT': (str, 'General', ''),
'HTTP_USERNAME': (str, 'General', ''), 'HTTP_USERNAME': (str, 'General', ''),
'HIPCHAT_URL': (str, 'Hipchat', ''), 'HIPCHAT_URL': (str, 'Hipchat', ''),
'HIPCHAT_COLOR': (str, 'Hipchat', 'green'), 'HIPCHAT_COLOR': (str, 'Hipchat', ''),
'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1), 'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1),
'HIPCHAT_EMOTICON': (str, 'Hipchat', ''), 'HIPCHAT_EMOTICON': (str, 'Hipchat', ''),
'HIPCHAT_ENABLED': (int, 'Hipchat', 0), 'HIPCHAT_ENABLED': (int, 'Hipchat', 0),

View file

@ -2769,11 +2769,13 @@ class HIPCHAT(object):
if self.emoticon: if self.emoticon:
text = self.emoticon + ' ' + text text = self.emoticon + ' ' + text
data = {'color': self.color, data = {'message': text,
'message': text,
'notify': 'false', 'notify': 'false',
'message_format': 'text'} 'message_format': 'text'}
if self.color:
data['color'] = self.color
hiphost = urlparse(self.apiurl).hostname hiphost = urlparse(self.apiurl).hostname
hippath = urlparse(self.apiurl).path hippath = urlparse(self.apiurl).path
hipquery = urlparse(self.apiurl).query hipquery = urlparse(self.apiurl).query