Problem
In format_conversations (scripts/telegram_extract.py, line 61), the time gap is computed as:
time_diff = int(next_msg["date_unixtime"]) - int(messages[j - 1]["date_unixtime"])
messages[j - 1] is the previous index in the full message list, not the previous message in your response chain. If there are skipped non-message entries (e.g. service events) between positions j-1 and j, the time diff is measured against the wrong message, potentially breaking a valid chain or allowing an invalid one.
Expected behavior
The time gap should be measured against the last successfully added response message, not the raw previous list index.
Problem
In
format_conversations(scripts/telegram_extract.py, line 61), the time gap is computed as:messages[j - 1]is the previous index in the full message list, not the previous message in your response chain. If there are skipped non-message entries (e.g. service events) between positionsj-1andj, the time diff is measured against the wrong message, potentially breaking a valid chain or allowing an invalid one.Expected behavior
The time gap should be measured against the last successfully added response message, not the raw previous list index.