my.fbmessenger.android: exclude unsent messages to avoid duplication
This commit is contained in:
parent
6a18f47c37
commit
2ca323da84
1 changed files with 9 additions and 0 deletions
|
@ -168,6 +168,15 @@ def _process_db_msys(db: sqlite3.Connection) -> Iterator[Res[Entity]]:
|
||||||
CAST(sender_id AS TEXT) AS sender_id,
|
CAST(sender_id AS TEXT) AS sender_id,
|
||||||
reply_source_id
|
reply_source_id
|
||||||
FROM messages
|
FROM messages
|
||||||
|
WHERE
|
||||||
|
/* Regular message_id conforms to mid.* regex.
|
||||||
|
However seems that when message is not sent yet it doesn't have this server id yet
|
||||||
|
(happened only once, but could be just luck of course!)
|
||||||
|
We exclude these messages to avoid duplication.
|
||||||
|
However poisitive filter (e.g. message_id LIKE 'mid%') feels a bit wrong, e.g. what if mesage ids change or something
|
||||||
|
So instead this excludes only such unsent messages.
|
||||||
|
*/
|
||||||
|
message_id != offline_threading_id
|
||||||
ORDER BY timestamp_ms /* they aren't in order in the database, so need to sort */
|
ORDER BY timestamp_ms /* they aren't in order in the database, so need to sort */
|
||||||
'''
|
'''
|
||||||
):
|
):
|
||||||
|
|
Loading…
Add table
Reference in a new issue