about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* add `files_file_in_account_data_path()`Steffen Jaeckel2022-03-136-71/+52
| | | | | | | | | | | | As all parts of the code invoking the `files_get_account_data_path()` function did the same afterwards, a function has been added with the same behavior. 1. create path 2. `mkdir` of that path 3. return final path Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* prevent segfaultSteffen Jaeckel2022-03-132-4/+11
| | | | | | | In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Alt+e is already bound, use Alt+cSteffen Jaeckel2022-03-131-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Add stat.h to editorMichael Vetter2022-03-041-0/+1
| | | | | | Fix on openbsd: `src/tools/editor.c:55:36: error: 'S_IRWXU' undeclared (first use in this function)`
* Include errno header in editor.cMichael Vetter2022-03-041-1/+2
|
* Move get_message_from_editor to appropriate file and change its keybindingMarcoPolo-PasTonMolo2022-03-035-88/+181
|
* Add hotkey for sending readline text to editorMarcoPolo-PasTonMolo2022-03-033-5/+31
|
* Add `/subject editor` commandMichael Vetter2022-02-263-5/+21
| | | | | | | | Allow editing the MUC subject using external editor. Use `/subject editor`. Fix https://github.com/profanity-im/profanity/issues/1638
* Set libstrophe log verbosityMichael Vetter2022-02-211-0/+1
| | | | | | | | | | | | | | | Set this to 0. We might want to have this configurable later. For now we fix the valgrind report: ``` Conditional jump or move depends on uninitialised value xmpp_debug_verbose() ``` Which will be fixed in libstrophe > 0.11.0 by commit https://github.com/strophe/libstrophe/commit/28f3ce19b803b3c2628c37545e3f5b88e7ea1a55
* Fix python executed during configurej.r2022-02-182-5/+5
| | | | | | | | | | | | | | | Previously it relied on AX_PYTHON_DEVEL, which in turn executes python-config to get the build flags. However this does not work while cross compiling because we can't execute the python-config build for the target platform. To circumvent this problem the python build flags are now queried via pkgconfig, which has the drawback of not having some extra build flags, but they do not seem to be needed. I tested this patch with the termux build system and it build without their existing hack of injecting python after the configure step. I also tested non cross compile build on Arch Linux and it also still works. Fixes #851
* Fix typos in commentsMichael Vetter2022-02-182-2/+2
|
* build: remove otr3 supportMichael Vetter2022-02-181-231/+0
| | | | All the distributions I checked have libotr 4.1.1 now.
* build: remove support for old libsignalMichael Vetter2022-02-182-20/+0
| | | | | | | | | Remove support for libsignal-protocol-c < 2.3.2. Debian 10 uses 2.3.2, Debian 11 and 12 use 2.3.3. openSUSE from 15.2 onward uses 2.3.3. Fedora since 28 uses 2.3.2. We should be good.
* fix handling of connection errorsSteffen Jaeckel2022-02-081-3/+2
| | | | | | | | | | | | | When a `see-other-host` stream-error is received we try to re-connect to the other host. Erroneously this also started the `reconnect_timer`. This lead to the behavior that in cases where e.g. the login failed we try to reconnect instead of bailing out with an error. This commit fixes the wrong behavior by not starting the `reconnect_timer`. Fix 0e58509c161ae8409c9accabb9606e0c7006b880 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Remove banned muc member from member listMichael Vetter2022-02-021-0/+4
| | | | | | | If I'm understing everything right the member should be removed here. muc_members_update() seems to have been writen for the same purpose. Fix https://github.com/profanity-im/profanity/issues/1594
* Fix off-by-oneSteffen Jaeckel2022-02-011-2/+2
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add missing IPv6 handlingSteffen Jaeckel2022-02-011-5/+22
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add fall-back for older GLib versionsSteffen Jaeckel2022-02-011-18/+54
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* handle `see-other-host` XMPP stream errorSteffen Jaeckel2022-02-015-2/+110
| | | | | | Fixes #1628 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* auto-formatSteffen Jaeckel2022-02-0120-132/+134
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* session: combine internal free-functionsSteffen Jaeckel2022-02-011-12/+8
| | | | | | `_session_free_saved_details()` remains as it's still required alone Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* command: change user mood clearing messageMichael Vetter2022-02-011-1/+1
|
* command: rename /mood clean to /mood clearMichael Vetter2022-02-013-5/+5
| | | | As per suggestion of @mdosch.
* command: adapt mood descriptionMichael Vetter2022-01-301-3/+3
|
* XEP-0107: User Mood - Clean moodStefan Kropp2022-01-304-14/+22
| | | | | | | | | | | | | | | | | | * Bugfix in mood_autocomplete (wrong parameter) * Implemented /mood clean ______________________________________ / Profanity! THE XMPP client with mood \ \ support! / -------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/
* presence: guard against invalid inputMichael Vetter2022-01-271-3/+12
| | | | | | | | | | | | | | | | | | | | | | It shouldn't happen that we get the presence stanza without a resource. https://datatracker.ietf.org/doc/html/rfc6120 ``` Implementation Note: It is the server's responsibility to deliver only stanzas that are addressed to the client's full JID or the user's bare JID; thus, there is no need for the client to check the 'to' address of incoming stanzas. However, if the client does check the 'to' address then it is suggested to check at most the bare JID portion (not the full JID), since the 'to' address might be the user's bare JID, the client's current full JID, or even a full JID with a different resourcepart (e.g., in the case of so- called "offline messages" as described in [XEP-0160]). ``` Let's not segfault though. Close https://github.com/profanity-im/profanity/issues/1630
* 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
| |