From 8c840637739549eaea84c54f49c2f4b27e9fa1e4 Mon Sep 17 00:00:00 2001 From: J-Rios Date: Wed, 22 May 2024 20:08:42 +0200 Subject: [PATCH 1/2] Get Serbo-Croatian from update_languages scripts --- tools/update_languages | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/update_languages b/tools/update_languages index 0a6b9d2..1742115 100644 --- a/tools/update_languages +++ b/tools/update_languages @@ -30,6 +30,7 @@ wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/lang wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pl.json wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pt_br.json wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/ru.json +wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/sr.json wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/sk.json wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/tr.json wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/uk.json From f2f30b893608f88f32fd2b65a3646bb58d0d2f2f Mon Sep 17 00:00:00 2001 From: J-Rios Date: Sat, 6 Jul 2024 17:46:41 +0200 Subject: [PATCH 2/2] Comply with privacy policies --- src/constants.py | 21 ++++++++++++++++++--- src/join_captcha_bot.py | 16 ++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/constants.py b/src/constants.py index d698d8f..8f73da4 100644 --- a/src/constants.py +++ b/src/constants.py @@ -10,9 +10,9 @@ Author: Creation date: 09/09/2018 Last modified date: - 22/05/2024 + 06/07/2024 Version: - 1.31.1 + 1.31.2 ''' ############################################################################### @@ -324,6 +324,20 @@ CONST = { "\nUkrainian / Українську\n/language uk\n" \ "\nUzbek / o'zbek\n/language uz\n", + # Privacy information + "PRIVACY": \ + "Privacy Information:\n" \ + "————————————————\n" \ + "This Bot doesn't store any data from users, but it stores some " \ + "group information (the group ID and Title).\n" + "\n" \ + "In order to work and check for user captcha solve responses, " \ + "the Bot needs to receive any message published in the group. The " \ + "content of the messages are only used to check if it contains the " \ + "captcha resolution. Once check is done, the message is discarded. " \ + "Messages from users that are not involved into a captcha process " \ + "are directly ignored and discarded.\n", + # Bot developer "DEVELOPER": "@JoseTLG", @@ -334,7 +348,7 @@ CONST = { "DEV_DONATION_ADDR": "https://ko-fi.com/joincaptchabot", # Bot version - "VERSION": "1.31.1 (22/05/2024)" + "VERSION": "1.31.2 (06/07/2024)" } # Supported languages list @@ -398,6 +412,7 @@ CMD = { "CHATID": {"KEY": "chatid"}, "VERSION": {"KEY": "version"}, "ABOUT": {"KEY": "about"}, + "PRIVACY": {"KEY": "privacy"}, "CAPTCHA": {"KEY": "captcha"}, "ALLOWUSERLIST": {"KEY": "allowuserlist"}, "ALLOWGROUP": {"KEY": "allowgroup"}, diff --git a/src/join_captcha_bot.py b/src/join_captcha_bot.py index 7758799..ef48956 100644 --- a/src/join_captcha_bot.py +++ b/src/join_captcha_bot.py @@ -13,9 +13,9 @@ Author: Creation date: 09/09/2018 Last modified date: - 19/05/2024 + 06/07/2024 Version: - 1.31.0 + 1.31.2 ''' ############################################################################### @@ -3529,6 +3529,17 @@ async def cmd_about(update: Update, context: ContextTypes.DEFAULT_TYPE): topic_id=tlg_get_msg_topic(update_msg)) +async def cmd_privacy(update: Update, context: ContextTypes.DEFAULT_TYPE): + ''' + Command /privacy handler. + ''' + msg = getattr(update, "message", None) + if msg is None: + return + await tlg_send_msg(context.bot, msg.chat_id, CONST["PRIVACY"], + topic_id=tlg_get_msg_topic(msg)) + + async def cmd_captcha(update: Update, context: ContextTypes.DEFAULT_TYPE): ''' Command /captcha message handler. Useful to test. @@ -3964,6 +3975,7 @@ def tlg_app_setup(token: str) -> Application: tlg_add_cmd(app, CMD["CHATID"]["KEY"], cmd_chatid) tlg_add_cmd(app, CMD["VERSION"]["KEY"], cmd_version) tlg_add_cmd(app, CMD["ABOUT"]["KEY"], cmd_about) + tlg_add_cmd(app, CMD["PRIVACY"]["KEY"], cmd_privacy) if CONST["BOT_OWNER"] != "XXXXXXXXX": tlg_add_cmd(app, CMD["CAPTCHA"]["KEY"], cmd_captcha) tlg_add_cmd(app, CMD["ALLOWUSERLIST"]["KEY"], cmd_allowuserlist)