about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* database.c: fix inserting messages to chat logs if archive_id is emptyJuraj Mlich2021-12-311-1/+1
| | | | | | | | | | | The original intention of the code was that in case archive_id is not set, NULL should be inserted. What is inserted however is an empty string. This causes the condition to not insert messages with non-unique archive_id insert only one message in total and ignore all further ones (if NULL was there, the condition would work properly). And this in turn causes chat history not work properly. This commit makes the SQL condition work properly and therefore fixes chat history. Fixes #1589.
* omemo: log when no pubsubMichael Vetter2021-12-131-0/+4
| | | | Closes https://github.com/profanity-im/profanity/issues/1621
* Merge branch 'master' into xep/xep0107-user-moodMichael Vetter2021-12-065-9/+23
|\
| * Merge pull request #1610 from nandesu-utils/masterMichael Vetter2021-11-301-4/+10
| |\ | | | | | | Fix message encryption for sender devices
| | * Refined sender device acquirementnandesu-utils2021-10-291-5/+7
| | | | | | | | | | | | | | | Now the sender devices are acknowledged only after omemo is loaded. That is, after key generation has been completed or identity has been loaded.
| | * Acquire sender's device list on connectionnandesu-utils2021-10-281-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | After generation of an identity we observe that `omemo_ctx.device_list` has an entry for sender's jid. But on application restart it is absent thus messages are not encrypted for the rest set of sender devices. This commit fixes this by applying code for acquiring the aforementioned device list after the connection.
| * | Merge pull request #1616 from trofi/masterMichael Vetter2021-11-262-3/+3
| |\ \ | | | | | | | | gcc-12 fixes
| | * | python_api.c: enlarge `c_arguments` array to avoid OOB writeSergei Trofimovich2021-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code below explicitly refers past `args_len`th element: c_arguments[args_len][0] = NULL; c_arguments[args_len][1] = NULL; Let's always allocate space for `NULL`. Noticed by Steffen Jaeckel.
| | * | src/plugins/python_api.c: drop redundant NULL pointer checkSergei Trofimovich2021-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc-12 detects redundant check against array of arrays as: src/plugins/python_api.c: In function ‘python_api_register_command’: src/plugins/python_api.c:199:31: error: the comparison will always evaluate as ‘true’ for the address of ‘c_arguments’ will never be NULL [-Werror=address] 199 | while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) { | ^~ src/plugins/python_api.c:161:15: note: ‘c_arguments’ declared here 161 | char* c_arguments[args_len == 0 ? 0 : args_len + 1][2]; | ^~~~~~~~~~~
| | * | src/plugins/callbacks.c: drop redundant NULL pointer checkSergei Trofimovich2021-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc-12 detects redundant check against array of arrays as: src/plugins/callbacks.c: In function ‘_free_command_help’: src/plugins/callbacks.c:85:26: error: the comparison will always evaluate as ‘true’ for the address of ‘args’ will never be NULL [-Werror=address] 85 | while (help->args[i] != NULL && help->args[i][0] != NULL) { | ^~ In file included from ./src/ui/ui.h:44, from ./src/command/cmd_defs.h:42, from src/plugins/callbacks.c:41: ./src/command/cmd_funcs.h:48:12: note: ‘args’ declared here 48 | gchar* args[128][2]; | ^~~~
| * | | Fix carbons criteriaMichael Vetter2021-11-252-2/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We came into the carbons checking code when we received `<private xmlns="urn:xmpp:carbons:2"/>`. Which actually marks a message to _not_ be a carbon. In this code we also make sure that carbons only come from us. If not we don't call the message handler code. So we should actually only check for `<sent xmlns='urn:xmpp:carbons:2'>` and `<received xmlns='urn:xmpp:carbons:2'>`. Thanks pukkamustard and Holger. Fixes https://github.com/profanity-im/profanity/issues/1614
* | | xep-0107: adapting the pubsub/headline codeMichael Vetter2021-12-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like mentioned on the review at https://github.com/profanity-im/profanity/pull/1605 I don't ge why @DebXWoody changed the code like he did. I changed it to something that made more sense to me now. Instead of looking for headline in two places and checking for pubsub in a headline place (only). I didn't check this deeply. And still have a feeling that this is not the best way to go. But I didn't read the XEP yet. Added a TODO to the code regarding this too. A quick skimming through https://xmpp.org/extensions/xep-0107.html doesn't show me anything regarding headline. So I really don't see why this needs to go here. Hopefully @DebXWoody checks this in the future. But since he didn't react on the PR I decided to make some adjustments myself so we can merge it.
* | | xep-0107: adjust helpMichael Vetter2021-12-061-5/+5
| | |
* | | xep-0107: code reviewDebXWoody2021-12-066-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | * Remarks in the Merge Request (ac_reset, help) * Defines in iq.c * Mood help and null check * Added additional information about tab key in CMD_DESC. * Added additional null check
* | | Add xep-0107: User Mood supportDebXWoody2021-12-068-1/+240
|/ / | | | | | | Implementation of XEP 0107 - User Mood
* | Cleanup _get_message_from_editor a bitMichael Vetter2021-11-011-5/+12
| | | | | | | | | | | | | | | | * Fix `src/command/cmd_funcs.c:9463:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]` * Free memory earlier and on less places * Check for succesful open() and write()
* | Fix OMEMO /sendfile on non-glibc systemsnlfx2021-11-011-1/+1
| |
* | auto-formatSteffen Jaeckel2021-10-272-3/+2
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | use new libstrophe APISteffen Jaeckel2021-10-272-45/+23
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | first step to remove libmesodeSteffen Jaeckel2021-10-2716-114/+0
|/ | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Merge pull request #1607 from profanity-im/utf8indicatorcharMichael Vetter2021-10-227-229/+201
|\ | | | | Allow more UI indicator signs to be utf8 "characters"
| * Allow utf8 in occupants header charMichael Vetter2021-10-226-29/+24
| |
| * Allow utf8 in occupants charMichael Vetter2021-10-226-29/+25
| |
| * Allow utf8 in roster room private charMichael Vetter2021-10-226-27/+22
| |
| * Allow utf8 in roster rooms charMichael Vetter2021-10-226-29/+24
| |
| * Allow utf8 in roster private charMichael Vetter2021-10-226-27/+22
| |
| * Allow utf8 in roster resource charMichael Vetter2021-10-226-30/+28
| |
| * Allow utf8 in roster contact charMichael Vetter2021-10-226-33/+28
| |
| * Allow utf8 in roster header charMichael Vetter2021-10-216-29/+32
| | | | | | | | | | | | | | | | | | This and the following commits should make a couple of more configs allow utf8 chars so people can use their weird icons :-) We did the same for the otr/omemo/pgp indicators at: https://github.com/profanity-im/profanity/commit/1f8b1eb740391941e79e1004ad041f8178a2b674 https://github.com/profanity-im/profanity/commit/5cf6ee1bc6d0b99b01891bc455a657bf022a72b0
* | Merge pull request #1601 from MarcoPolo-PasTonMolo/masterMichael Vetter2021-10-226-55/+145
|\ \ | |/ |/| Add /correct-editor command
| * Move declaration and definition of win_get_last_sent_message to the correct ↵MarcoPolo-PasTonMolo2021-10-225-32/+33
| | | | | | | | place
| * Remove autocomplete for /correct-editorMarcoPolo-PasTonMolo2021-10-214-31/+18
| | | | | | | | | | | | We decided that it was better to remove autocomplete for this command, since adding it only introduced problems and the command can still function perfectly without autocomplete.
| * Export common code to helper functionsMarcoPolo-PasTonMolo2021-10-171-122/+72
| |
| * Add /correct-editor commandMarcoPolo-PasTonMolo2021-10-074-1/+153
| |
* | Format new register code correctlyMichael Vetter2021-10-1313-43/+34
| |
* | Merge pull request #1574 from binex-dsk/masterMichael Vetter2021-10-1313-2/+506
|\ \ | |/ |/| | | Add in-band account registration Fix https://github.com/profanity-im/profanity/issues/199
| * registration: memory leaks, error checkingswirl2021-10-132-6/+6
| |
| * fixed crashes when server doesn't support registrationswirl2021-10-101-1/+1
| |
| * registration: remove auth param and excess functionsswirl2021-08-179-210/+5
| |
| * REGISTRATION FIXEDMichael Vetter2021-08-171-8/+8
| |
| * progress on fixing registrationswirl2021-08-172-8/+6
| | | | | | | | | | | | doesnt segfault on register, but aborts when you type after registering need to find a way to disconnect later
| * hacky fix(?) for registerswirl2021-08-174-20/+366
| | | | | | | | very bad and spaghetti will fix later
| * fixed some bugs, added some moreswirl2021-08-179-15/+96
| | | | | | | | | | | | | | | | | | - Added JABBER_RAW_CONNECT[ING/ED] connection states - Added cl_ev_connect_raw and session_connect_raw to conform to normal connection functions - Fixed SIGABRT during registration - Added a check in cmd_register to ensure it's actually connected before registering--but this will always fail atm
| * /register: parameter updatesswirl2021-08-172-14/+24
| | | | | | | | add auth param, switch host and username params, rename host param to server
| * initial register command testswirl2021-08-179-0/+274
| |
* | Format code correctlyMichael Vetter2021-10-0526-88/+84
| |
* | Fix history timestampMarcoPolo-PasTonMolo2021-10-051-6/+6
| | | | | | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1423 Oldest stanza is fetched like before but now the timestamp is generated by creating date_time_from_iso8601 and then to_local, instead of trusting that the timestamp is in utc. The procedure previously was stamp = time_val_from_iso8601() then date_time = date_time_from_utc(stamp) then local_date_time = to_local(date_time)
* | Fix fromat string in statusbarMichael Vetter2021-09-291-7/+7
| | | | | | | | Regards https://github.com/profanity-im/profanity/issues/1597#issuecomment-930540261
* | Fix wrong format string in titlebarMichael Vetter2021-09-291-3/+3
| | | | | | | | | | | | | | See https://github.com/profanity-im/profanity/commit/fd9ccec8dc604902bbb1d444dba4223ccee0a092 and https://github.com/profanity-im/profanity/issues/1597#issuecomment-930426764.
* | Add more help about how to use pluginsMichael Vetter2021-09-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `/plugins install` installs a plugin to `.local/share/profanity/plugins`. And also loads it. When a plugin is loaded it will automatically be added to the `profrc` file like this: ``` [plugins] load=my.py; ``` On the next start Profanity will try to load this plugin again unless `/plugin unload my.py` is called.