Skip to content

Commit 7a44fff

Browse files
author
Aubruz
committed
Modify ListItem and TextButton add_payload function
1 parent f41d997 commit 7a44fff

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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.0",
7+
version="1.3.1",
88
author="aubruz",
99
author_email="aubruz@hotmail.com",
1010
packages=find_packages(),

mainframe/form_component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ def set_list_type(self, list_type):
6363
# throw new UIException('The type of a ListItem must be either "copy_url", "open_url", "open_modal", "message_embed" or "post_payload"!')
6464
return self._add_props({"type": list_type})
6565

66-
def set_payload(self, payload):
66+
def add_payload(self, payload):
6767
# if(!in_array(self.getProp("type"), ["open_modal", "message_embed", "post_payload"])) {
6868
# throw new UIException('To set a payload, the type of the ListItem must be either "open_modal", "message_embed" or "post_payload"!')
69-
return self._add_props({"payload": payload})
69+
return self._add_payload(payload)
7070

7171
def set_url(self, url):
7272
# if(!in_array(self.getProp("type"), ["copy_url", "open_url"])) {

mainframe/text_component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def set_text_type(self, type):
2121
# throw new UIException('The type of a TextButton must be either "copy_url", "open_url", "open_modal" or "post_payload"!')
2222
return self._add_props({"type": type})
2323

24-
def set_payload(self, payload):
24+
def add_payload(self, payload):
2525
# if(!in_array(self.getProp("type"), ["open_modal", "post_payload"])) {
2626
# throw new UIException('To set a payload, the type of the TextButton must be either "open_modal" or "post_payload"!')
27-
return self._add_props({"payload": payload})
27+
return self._add_payload(payload)
2828

2929
def set_url(self, url):
3030
# if(!in_array(self.getProp("type"), ["copy_url", "open_url"])) {

0 commit comments

Comments
 (0)