Skip to content

Commit

Permalink
Allow get user's name in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Pingdred committed Oct 16, 2024
1 parent a52726f commit 18595a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions meowgram_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
def get_name(telegram_update):
settings = MadHatter().get_plugin().load_settings()

name = telegram_update["message"]["chat"].get("first_name", None)
username = telegram_update["message"]["chat"].get("username", None)
name = telegram_update["message"]["from"].get("first_name", None)
username = telegram_update["message"]["from"].get("username", None)

if settings["name_to_use"] == NameType.NAME.value and name:
return name
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Meowgram Connect",
"version": "0.0.3",
"version": "0.0.4",
"description": "Supercharge your Meowgram client with the Meowgram Connect plugin, enabling smooth integration with the Cheshire Cat framework.",
"author_name": "Emanuele Morrone",
"author_url": "https://www.linkedin.com/in/emanuele-morrone-25537423b/",
Expand Down

0 comments on commit 18595a1

Please sign in to comment.