fix(telegram): dedupe duplicate incoming messages (#198)

This commit is contained in:
banteg
2026-02-08 19:10:34 +04:00
committed by GitHub
parent b293818195
commit fb51708473
5 changed files with 298 additions and 141 deletions
+3
View File
@@ -55,6 +55,7 @@ def test_parse_incoming_update_maps_fields() -> None:
assert msg.document is None
assert msg.raw
assert msg.raw["message_id"] == 10
assert msg.update_id == 1
def test_parse_incoming_update_ignores_implicit_topic_reply() -> None:
@@ -83,6 +84,7 @@ def test_parse_incoming_update_ignores_implicit_topic_reply() -> None:
assert msg.reply_to_text is None
assert msg.reply_to_is_bot is None
assert msg.reply_to_username is None
assert msg.update_id == 1
def test_parse_incoming_update_filters_non_matching_chat() -> None:
@@ -295,6 +297,7 @@ def test_parse_incoming_update_callback_query() -> None:
assert msg.callback_query_id == "cbq-1"
assert msg.data == "takopi:cancel"
assert msg.sender_id == 321
assert msg.update_id == 1
def test_parse_incoming_update_topic_fields() -> None: