Skip to content

Commit f89a9cd

Browse files
author
Aubruz
committed
Allow user to send object messages
1 parent 7a44fff commit f89a9cd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="mainframe-bot-api",
7-
version="1.3.1",
7+
version="1.3.2",
88
author="aubruz",
99
author_email="[email protected]",
1010
packages=find_packages(),

mainframe/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import requests
22
import json
33

4+
from mainframe import UIPayload
5+
46

57
class Client(object):
68
"""Class that handles calls to and responses from Mainframe API
@@ -25,8 +27,8 @@ def send_message(self, conversation_id, message='', subscription_id=None, messag
2527
"""
2628
data = {'conversation_id': conversation_id, "message": message}
2729

28-
# if message instanceof UIPayload){
29-
# self.json["data"] = message.get();
30+
if isinstance(message, UIPayload):
31+
data["data"] = message.get()
3032

3133
if subscription_id is not None:
3234
data['subscription_id'] = subscription_id

0 commit comments

Comments
 (0)