I mean get_message_from_editor_async function is rendered obsolete by new editor function from upsteam.
I am not sure where to reply, but in the roster_update_presence, resource is a param. setting it to null before returning does not increase safety. it will just override a local variable.
I feel that it's overly complicated. Starting from the GString* full_line, everything could be done in nearly a one-liner:
early exit here would lower the nesting and potentially improve readability
I am not sure if it's ok to just silently continue in this place. It deserves at the very least debug log.
I am not sure if the overlap between stanza_ids and archive_ids is a valid approach. We might want to separate them in two distinct tables.
It seemingly mirrors functionality of the original database.c + adds integrity verification.
Here and in other places, can we return necessary documentation detailing DB fields, decisions, and other useful points?
We might want to also check integrity of the tables (whether they exist + maybe even their columns). But it would introduce further complexity and should be a subject of a separate issue.
Generally, it's good and well-written. Some parts require minor polish + merge to upstream. Overall, it's a solid job.