diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-10-05 10:01:27 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-10-05 10:01:27 +0200 |
commit | f21595597f4fa872b77d7f76ae04916f4aae732e (patch) | |
tree | f0d4dec07da9a695a8627575b1837ba26441e911 /src/database.c | |
parent | 7e8cf4a3d680ef5b8f056021846818fb526635d9 (diff) | |
download | profani-tty-f21595597f4fa872b77d7f76ae04916f4aae732e.tar.gz |
Format code correctly
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/database.c b/src/database.c index 00aff314..c05e3035 100644 --- a/src/database.c +++ b/src/database.c @@ -329,18 +329,18 @@ _add_to_db(ProfMessage* message, char* type, const Jid* const from_jid, const Ji } query = sqlite3_mprintf("INSERT INTO `ChatLogs` (`from_jid`, `from_resource`, `to_jid`, `to_resource`, `message`, `timestamp`, `stanza_id`, `archive_id`, `replace_id`, `type`, `encryption`) SELECT '%q', '%q', '%q', '%q', '%q', '%q', '%q', '%q', '%q', '%q', '%q' WHERE NOT EXISTS (SELECT 1 FROM `ChatLogs` WHERE `archive_id` = '%q')", - from_jid->barejid, - from_jid->resourcepart ? from_jid->resourcepart : "", - to_jid->barejid, - to_jid->resourcepart ? to_jid->resourcepart : "", - message->plain ? message->plain : "", - date_fmt ? date_fmt : "", - message->id ? message->id : "", - message->stanzaid ? message->stanzaid : "", - message->replace_id ? message->replace_id : "", - type ? type : "", - enc ? enc : "", - message->stanzaid ? message->stanzaid : ""); + from_jid->barejid, + from_jid->resourcepart ? from_jid->resourcepart : "", + to_jid->barejid, + to_jid->resourcepart ? to_jid->resourcepart : "", + message->plain ? message->plain : "", + date_fmt ? date_fmt : "", + message->id ? message->id : "", + message->stanzaid ? message->stanzaid : "", + message->replace_id ? message->replace_id : "", + type ? type : "", + enc ? enc : "", + message->stanzaid ? message->stanzaid : ""); if (!query) { log_error("log_database_add(): SQL query. could not allocate memory"); return; |