about summary refs log tree commit diff stats
path: root/src/database.c
Commit message (Collapse)AuthorAgeFilesLines
* Use files_get_account_data_path instead of duplicate codeMichael Vetter2020-07-011-16/+10
| | | | | We often had a use case where we want the account specific data dir. Let's create a function for this instead of doing it by hand each time.
* Feature request - XEP-0373: OpenPGP for XMPP (OX)DebXWoody2020-06-291-1/+3
| | | | | | | | | Basic implementation of XEP-0373: OpenPGP for XMPP. https://xmpp.org/extensions/xep-0373.html Command /ox Issue: #1331
* Fix carbon loggingMichael Vetter2020-05-271-4/+8
| | | | Regards https://github.com/profanity-im/profanity/issues/1342
* Escape message before adding to SQL backendMichael Vetter2020-04-181-1/+5
|
* Add to_jid field to ProfMessage structMichael Vetter2020-04-111-4/+5
| | | | | Is usefult in many cases if we want cleaner code. Hope this edit didn't break anything though ;-)
* Fix error in getting previous chatlogMichael Vetter2020-04-101-1/+5
| | | | | | | | | Our search was too broad, and thus incorrect. One of the various mistakes it can cause was https://github.com/profanity-im/profanity/issues/1308 Fix https://github.com/profanity-im/profanity/issues/1308
* Retrieve message type from databaseMichael Vetter2020-04-081-1/+16
| | | | So we don't have to check for MUC another way.
* Downgrade dependenciesMichael Vetter2020-04-071-2/+8
| | | | | | | | | | | Use g_date_time_format() instead of g_date_time_format_iso8601() to only rely on glib 2.56.0 which is the latest version in Debian Buster (current stable). We also only use basic sqlite functions so 3.27.0 should be fine there (also the one in Debian buster). Thanks to @DebXWoody.
* Add missing includesMichael Vetter2020-04-061-0/+3
|
* db: actually display the last 10 entries in correct orderMichael Vetter2020-04-061-1/+1
|
* db: get last messages sorted by timestampMichael Vetter2020-04-061-1/+1
|
* db: Use type from message struct instead of having individual functionsMichael Vetter2020-04-061-75/+79
|
* db: Fix memleaksMichael Vetter2020-04-061-0/+1
|
* Add sql to error logMichael Vetter2020-04-061-2/+2
| | | | so we can more easily grep for it.
* Remove chat_log_get_previous()Michael Vetter2020-04-061-2/+2
| | | | | | | | | | | | We now dont get the log files from the text files via chat_log_get_previous() anymore. We use the sql backend via log_database_get_previous_chat(). So far it just has the same behaviour like chat_log_get_previous(), except that in _chatwin_history() we don't pass the sender to win_print_history() which should be fixed in a commit soon. And log_database_get_previous_chat() can later easily be expanded to fix https://github.com/profanity-im/profanity/issues/205.
* Get regular chat history out of sql backendMichael Vetter2020-04-061-2/+44
|
* db: log encryption typeMichael Vetter2020-04-061-2/+19
|
* db: log "to" resourceMichael Vetter2020-04-061-8/+8
|
* db: log "from" resourceMichael Vetter2020-04-061-6/+7
|
* db: log all incoming and outgoing messagesMichael Vetter2020-04-061-18/+33
|
* db: log outgoing message in one caseMichael Vetter2020-04-061-11/+43
| | | | Not all cases covered yet.
* db: add dedicated chat, muc, muc pm logging functionsMichael Vetter2020-04-061-1/+20
|
* db: insert message typeMichael Vetter2020-04-061-4/+14
|
* db: add more needed fieldsMichael Vetter2020-04-061-7/+20
| | | | DB fields should be complete now.
* db: make id autoincrementMichael Vetter2020-04-061-1/+1
|
* db: fix inserting null in databaseMichael Vetter2020-04-061-1/+1
|
* db: log replace idMichael Vetter2020-04-061-3/+3
|
* db: use goto in error caseMichael Vetter2020-04-061-24/+13
|
* db: add db versionMichael Vetter2020-04-061-1/+25
| | | | so we can later migrate.
* db: move includesMichael Vetter2020-04-061-4/+1
|
* db: guard against no DBMichael Vetter2020-04-061-2/+10
| | | | | | | | Maybe if we only use `/connect` we dont have ProfAccount. In that case we won't log anything. Only if a account is used we log. If this is the case or the init of the db didn't work we still want profanity to run but wont log anything to the db.
* db: Have one database per accountMichael Vetter2020-04-061-4/+41
|
* database: log stanza_id and whether it is a muc messageMichael Vetter2020-04-061-4/+4
|
* database: log incoming messagesMichael Vetter2020-04-061-0/+30
| | | | First trial. Not covering all cases yet.
* database: Define chatlog database locationMichael Vetter2020-04-061-6/+11
|
* database: create tableMichael Vetter2020-04-061-2/+13
|
* Start SQLite db moduleMichael Vetter2020-04-061-0/+70
I plan to save all messages in an SQLite db. For retrieving information it's nicer than having it in a text file. We will have more info in there and easier to parse it. This will also be good for later MAM (https://github.com/profanity-im/profanity/issues/660). Regular text files will still be an option for users so that they can easily grep them and do whatever they like. Internally Profanity will only use the SQLite db.