From 5a9b7876c7efff5a5440b1a9a4073348ac33cfc5 Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Tue, 22 Dec 2020 22:50:02 +0400
Subject: [PATCH] Skipping some chats.

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 .pre-commit-config.yaml | 3 ---
 src/actions/replies.py  | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a96bc8d..7b45bad 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,6 @@ repos:
     rev: 4.3.21
     hooks:
       - id: isort
-        language_version: python3.8
         exclude: >
           (?x)^(
               alembic/.+|
@@ -13,7 +12,6 @@ repos:
     rev: 19.10b0
     hooks:
       - id: black
-        language_version: python3.8
   - repo: https://github.com/IamTheFij/docker-pre-commit
     rev: v2.0.0
     hooks:
@@ -26,7 +24,6 @@ repos:
       - id: requirements-txt-fixer
       - id: trailing-whitespace
       - id: flake8
-        language_version: python3.8
         name: flake8
         entry: flake8
         exclude: >
diff --git a/src/actions/replies.py b/src/actions/replies.py
index 4e3d028..d682744 100644
--- a/src/actions/replies.py
+++ b/src/actions/replies.py
@@ -12,7 +12,9 @@ logger = logging.getLogger(__name__)
 @config.telegram_client.on(events.ChatAction())
 @mark_unread
 async def welcome(event: events.ChatAction.Event):
-    if event.user_joined or event.user_added:
+    if str(event.chat.id) in ["-414207303", "-1001151788445"]:
+        return
+    if event.user_joined:
         await event.respond(
             random.choice(
                 ["Привет!", "Добро пожаловать!", "Здравствуй!", "Добрый день!"]
-- 
GitLab