Merge branch 'name_on_message' into 'master'
add name when sending message from mattermost See merge request kelder/cammiechat!1
This commit is contained in:
commit
f929cc745a
1 changed files with 4 additions and 1 deletions
3
chat.py
3
chat.py
|
@ -89,6 +89,9 @@ def messages_post():
|
||||||
messages.append(Message(time, "1.3.3.7", "ip", "Nee"))
|
messages.append(Message(time, "1.3.3.7", "ip", "Nee"))
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|
||||||
|
if sender != "somebody":
|
||||||
|
message = "<" + sender + "> " + message
|
||||||
|
|
||||||
messages.append(Message(time, sender, sendertype, str(message, "UTF-8")))
|
messages.append(Message(time, sender, sendertype, str(message, "UTF-8")))
|
||||||
url = 'http://10.0.5.42:8000/' # Set destination URL here
|
url = 'http://10.0.5.42:8000/' # Set destination URL here
|
||||||
post_fields = {'X-Messages': base64.b64encode(message)}
|
post_fields = {'X-Messages': base64.b64encode(message)}
|
||||||
|
|
Loading…
Reference in a new issue