Skip to content

Commit

Permalink
fixed upload_media issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalebu committed Dec 21, 2022
1 parent 58ad576 commit 6b1071f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions heyoo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def upload_media(self, media: str):
logging.info(f"Uploading media {media}")
r = requests.post(
f"{self.base_url}/{self.phone_number_id}/media",
headers=self.headers,
headers=headers,
data=form_data,
)
if r.status_code == 200:
Expand Down Expand Up @@ -498,10 +498,7 @@ def create_button(self, button):
Args:
button[dict]: A dictionary containing the button data
"""
data = {
"type": "list",
"action": button.get("action")
}
data = {"type": "list", "action": button.get("action")}
if button.get("header"):
data["header"] = {"type": "text", "text": button.get("header")}
if button.get("body"):
Expand Down

0 comments on commit 6b1071f

Please sign in to comment.