From ce0a974c918a44d4a1fdc2006ddc9330ef8dad37 Mon Sep 17 00:00:00 2001 From: Badiboy Date: Wed, 29 Jun 2022 19:24:27 +0300 Subject: [PATCH] Copyright update --- telebot/__init__.py | 10 +++++----- telebot/callback_data.py | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 85454c5..ee73b3f 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -385,7 +385,7 @@ class TeleBot: new_poll_answers = None new_my_chat_members = None new_chat_members = None - chat_join_request = None + new_chat_join_request = None for update in updates: if apihelper.ENABLE_MIDDLEWARE: @@ -442,8 +442,8 @@ class TeleBot: if new_chat_members is None: new_chat_members = [] new_chat_members.append(update.chat_member) if update.chat_join_request: - if chat_join_request is None: chat_join_request = [] - chat_join_request.append(update.chat_join_request) + if new_chat_join_request is None: new_chat_join_request = [] + new_chat_join_request.append(update.chat_join_request) if new_messages: self.process_new_messages(new_messages) @@ -471,8 +471,8 @@ class TeleBot: self.process_new_my_chat_member(new_my_chat_members) if new_chat_members: self.process_new_chat_member(new_chat_members) - if chat_join_request: - self.process_new_chat_join_request(chat_join_request) + if new_chat_join_request: + self.process_new_chat_join_request(new_chat_join_request) def process_new_messages(self, new_messages): self._notify_next_handlers(new_messages) diff --git a/telebot/callback_data.py b/telebot/callback_data.py index 17bf27f..58fa0d5 100644 --- a/telebot/callback_data.py +++ b/telebot/callback_data.py @@ -1,3 +1,30 @@ +""" +Copyright (c) 2017-2018 Alex Root Junior + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + + +This file was added during the pull request. The maintainers overlooked that it was copied +"as is" from another project and they do not consider it as a right way to develop a project. +However, due to backward compatibility we had to leave this file in the project with the above +copyright added, as it is required by the original project license. +""" + import typing