From 18595a1fa6d7a118cb329d91b7b0290b6b0d328b Mon Sep 17 00:00:00 2001 From: Pingdred Date: Wed, 16 Oct 2024 13:45:43 +0200 Subject: [PATCH] Allow get user's name in groups --- meowgram_connect.py | 4 ++-- plugin.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meowgram_connect.py b/meowgram_connect.py index 943411b..952c08a 100644 --- a/meowgram_connect.py +++ b/meowgram_connect.py @@ -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 diff --git a/plugin.json b/plugin.json index 9935e05..ff897aa 100644 --- a/plugin.json +++ b/plugin.json @@ -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/",