1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
profanity/src
Michael Vetter c9b154b1a2 database: Only insert if there is no entry with same archive_id
archive_is is <stanza-id> or <result id=""> and should identify one
message stable and uniquely.

See XEP-0359: Unique and Stable Stanza IDs.

We need this for example for this situation:
* we go online with Profanity
* we fetch all messages since yesterday
* we add them to the db
* we go offline
* we go online with Profanity
* we fetch all messages since yesterday
* we only want to add the new ones

So far we don't ask MAM "give me all since last 'id'" but since a
certain date.

In case no archive_id will be set, it will be `(null)` and thus should
be inserted anyways because it won't find a value with (null) in that
row.

Because when adding we use `message->stanzaid ? message->stanzaid : "",`
so it will be empty in such a case.

Regards MAM: https://github.com/profanity-im/profanity/issues/660
Regards Stable IDs: https://github.com/profanity-im/profanity/issues/1207
2020-07-23 15:23:18 +02:00
..
command Fix /correct quotation marks usage 2020-07-23 09:40:22 +02:00
config Apply coding style 2020-07-07 14:18:57 +02:00
event Pass window to functions so we dont have to call twice 2020-07-09 16:11:50 +02:00
omemo Free errors after they have been printed 2020-07-10 14:50:29 +02:00
otr Apply coding style 2020-07-07 14:18:57 +02:00
pgp OX: XEP-0373: OpenPGP for XMPP - Version 0.5.0 (2020-06-19) 2020-07-10 13:40:00 +02:00
plugins Dont hilight console once all messages have been read 2020-07-09 15:44:35 +02:00
tools parser.c: Use glib 2020-07-23 09:42:43 +02:00
ui Fix memleak in win_print_outgoing_with_receipt() 2020-07-23 10:06:49 +02:00
xmpp Parse stanza-id 2020-07-23 14:21:27 +02:00
common.c Apply coding style 2020-07-07 14:18:57 +02:00
common.h Apply coding style 2020-07-07 14:18:57 +02:00
database.c database: Only insert if there is no entry with same archive_id 2020-07-23 15:23:18 +02:00
database.h Apply coding style 2020-07-07 14:18:57 +02:00
log.c Apply coding style 2020-07-07 14:18:57 +02:00
log.h Apply coding style 2020-07-07 14:18:57 +02:00
main.c Apply coding style 2020-07-07 14:18:57 +02:00
profanity.c Apply coding style 2020-07-07 14:18:57 +02:00
profanity.h Apply coding style 2020-07-07 14:18:57 +02:00