Compare commits

...

5 Commits
0.3.1 ... main

Author SHA1 Message Date
miloszowi
44ecc307e3 another fix for reaction 2024-03-05 09:49:35 +01:00
miloszowi
fca6dd6f80 fixed issue when reacting to message triggered dynamic mention 2024-03-05 09:47:47 +01:00
miloszowi
eeb9fe5c3a fixed character escaping in replier 2024-03-05 08:32:48 +00:00
miloszowi
12a1c08866 fixed backslash escape in replier 2024-02-28 13:18:22 +00:00
miloszowi
e44f4b75a5 0.3.2 - fixed a bug with missing + in replier 2024-02-28 11:32:57 +01:00
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,9 @@
# Change Log
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
### Changed
- fixed markdown replier to respect restricted characters provided in the [api docs](https://core.telegram.org/bots/api#markdownv2-style)

View File

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

View File

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