Commit Graph

7 Commits

Author SHA1 Message Date
ruberoid
78d1099bfc Add message deduplication and versioning for text match notifications
This update implements a comprehensive solution to prevent duplicate notifications
when Telegram messages are edited, while maintaining a full history of changes.

Features:
- New TextMatch entity to store match history with versioning
- Database migration for TextMatches table with proper indexes
- TextMatchRepository for managing match records
- TextSubscriptionUpdated event for message update notifications
- Enhanced MessageReceivedHandler with deduplication logic:
  * First match creates version 1 and publishes TextSubscriptionMatched
  * Subsequent updates create new versions and publish TextSubscriptionUpdated
  * Skips notifications if message text hasn't changed

Technical details:
- MessageId changed from int to long to match Telegram API types
- Proper indexes on (MessageId, SubscriptionId) and UserId
- Full audit trail of message edits in database

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 13:22:58 +04:00
Ruberoid
85bc493d73 added mass deactivate subscription for user. 2025-07-21 16:40:02 +03:00
Sergey Nazarov
65f03d2e20 Add Nocr.TextMatcher.Migrator 2024-03-30 11:31:23 +03:00
Sergey Nazarov
3c0f6010c5 Fix TextMatcherContext.cs 2024-03-30 09:43:43 +03:00
Sergey Nazarov
9eacdd90d1 Add IsPackable=false for Persistence project 2024-03-30 09:16:35 +03:00
Sergey Nazarov
c88a7aee5e Update project structure 2024-03-30 09:14:06 +03:00
Sergey Nazarov
ced8c15efb DRAFT: nazarovsa/persistence (#2)
Reviewed-on: #2
Co-authored-by: Sergey Nazarov <insight.appdev@gmail.com>
Co-committed-by: Sergey Nazarov <insight.appdev@gmail.com>
2024-03-29 13:24:04 +00:00