Skip to content

Commit

Permalink
fix: ensure message in report has a text (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
TendTo committed Mar 28, 2024
1 parent 4d9090d commit b6032c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fix **spam_comment_msg** handler to avoid raising an exception when the message does not contain text
- Ensure message in report has a text

### Changed

Expand Down
2 changes: 1 addition & 1 deletion src/spotted/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def add_handlers(app: Application):
if Config.post_get("blacklist_messages") and len(Config.post_get("blacklist_messages")) > 0:
app.add_handler(
MessageHandler(
community_filter & filters.Text(),
community_filter & filters.TEXT,
spam_comment_msg,
),
2,
Expand Down
2 changes: 1 addition & 1 deletion src/spotted/handlers/report_spot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def report_spot_conv_handler() -> ConversationHandler:
entry_points=[CallbackQueryHandler(report_spot_callback, pattern=r"^report\.*")],
states={
ConversationState.REPORTING_SPOT.value: [
MessageHandler(~filters.COMMAND & ~filters.UpdateType.EDITED_MESSAGE, report_spot_msg)
MessageHandler(~filters.COMMAND & ~filters.UpdateType.EDITED_MESSAGE & filters.TEXT, report_spot_msg)
],
},
fallbacks=[CommandHandler("cancel", conv_cancel("report"))],
Expand Down

0 comments on commit b6032c4

Please sign in to comment.