Compare commits

..

No commits in common. "main" and "0.3.1" have entirely different histories.
main ... 0.3.1

3 changed files with 3 additions and 9 deletions

View File

@ -1,9 +1,6 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.3.2] - 28.02.2023
### Changed
- fixed bug with missing '+' in replier
## [0.3.1] - 28.02.2023 ## [0.3.1] - 28.02.2023
### Changed ### Changed
- fixed markdown replier to respect restricted characters provided in the [api docs](https://core.telegram.org/bots/api#markdownv2-style) - fixed markdown replier to respect restricted characters provided in the [api docs](https://core.telegram.org/bots/api#markdownv2-style)

View File

@ -23,9 +23,6 @@ class DynamicMentionHandler(AbstractHandler):
self.chat_repository = ChatRepository() self.chat_repository = ChatRepository()
def handle(self, update: Update, context: CallbackContext) -> None: def handle(self, update: Update, context: CallbackContext) -> None:
if hasattr(update, 'message_reaction'):
return
users = self.chat_repository.get_users_for_group(self.inbound) users = self.chat_repository.get_users_for_group(self.inbound)
Replier.markdown(update, MessageBuilder.mention_message(users)) Replier.markdown(update, MessageBuilder.mention_message(users))

View File

@ -18,7 +18,7 @@ class Replier:
telegramRestrictionCharacters = ['_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!'] telegramRestrictionCharacters = ['_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']
for character in telegramRestrictionCharacters: for character in telegramRestrictionCharacters:
formatted.replace(character, r'\{character}') formatted.replace(character, "\\" + character)
return formatted return formatted
@ -27,7 +27,7 @@ class Replier:
try: try:
update.effective_message.reply_markdown_v2(message, reply_markup=reply_markup) update.effective_message.reply_markdown_v2(message, reply_markup=reply_markup)
except Exception as err: except Exception as err:
Logger.error("replier.markdown error: " + str(err)) Logger.error("replier.markdown error: "str(err))
@staticmethod @staticmethod
def html(update: Update, html: str, reply_markup: Optional[InlineKeyboardMarkup] = None) -> None: def html(update: Update, html: str, reply_markup: Optional[InlineKeyboardMarkup] = None) -> None: