Skip to content

Commit 12452c5

Browse files
committed
Fix getters
1 parent 8cea5e5 commit 12452c5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

social/utils/telegram_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_chat_info(id: int) -> dict:
2222
logger.error(resp.text)
2323
return {}
2424
else:
25-
return resp.json()
25+
return resp.json().get("result", {})
2626

2727

2828
def create_telegram_group(update: Update):

social/utils/vk_groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_chat_info(peer_id) -> dict:
2424
},
2525
)
2626
try:
27-
return conversation["response"]["items"][0]["chat_settings"]
27+
return conversation.json()["response"]["items"][0]["chat_settings"]
2828
except Exception as exc:
2929
logger.exception(exc)
3030
return None
@@ -42,7 +42,7 @@ def get_chat_invite_link(peer_id):
4242
},
4343
)
4444
try:
45-
return conversation["response"]["link"]
45+
return conversation.json()["response"]["link"]
4646
except Exception as exc:
4747
logger.exception(exc)
4848
return None

0 commit comments

Comments
 (0)