about summary refs log tree commit diff stats
path: root/src/xmpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove not needed includeMichael Vetter2020-12-161-1/+0
|
* Fix various typosMichael Vetter2020-12-103-5/+5
|
* Declare counter var inside loopMichael Vetter2020-11-092-10/+5
| | | | We require c99/gnu99 anyways.
* Print all error stanzasMichael Vetter2020-10-301-5/+5
| | | | | | | | | | | | | | | | | | Regards https://github.com/profanity-im/profanity/issues/1435 So far we didn't print the error if it contained `<error type="cancel">`. It appears that the code always thought this is a service-not-available (so one is either blocked or the account doesn't exist) and printed `Recipient not found`. But there can be other errors as well. Like in above mentioned issue `not-allowed`. Let's just print the text. In case of the cancel type we still remove the jid from the chat sessions. I'm not entirely sure whether this needs to be done in other cases too.
* Fixed Date format for MAM requestDebXWoody2020-10-281-2/+2
| | | | | | | | | Using g_date_time_new_now_utc instead of g_date_time_new_now_local Using g_date_time_format(timestamp, "%FT%TZ") instead of "%FT%T%:::z" Edit: DebXWoody created this patch because ejabberd returned an error with the old date format.
* xmpp/bookmark: don't use uninitialised fieldDmitry Podgorny2020-10-191-0/+1
| | | | | | | | | | When a bookmark is created with '/bookmark add' command, ext_gajim_minimize remains uninitialised in new bookmark object and is read further in _send_bookmarks(). Initialise the field with 0. Fixes #1432.
* Since the string from strerror should never be modified, use const.Philipp Klaus Krause2020-10-141-1/+1
|
* Enable _handle_ox_chat() payload/body decryptionMichael Vetter2020-10-091-3/+0
| | | | | This part of the code was waiting for xmpp_stanza_new_from_string() from libstrophe 0.10.0.
* Replace stanza_get_child_by_name_and_ns with ↵Michael Vetter2020-09-306-32/+10
| | | | | | | | xmpp_stanza_get_child_by_name_and_ns Replace our own stanza_get_child_by_name_and_ns() with the upstreamed xmpp_stanza_get_child_by_name_and_ns() provided by the new libstrophe/libmesode 0.10.0.
* Require libstrophe/libmesode 0.10.0Michael Vetter2020-09-301-8/+0
|
* Fix memory leak in _handle_chat()Dmitry Podgorny2020-08-071-21/+7
| | | | | jid_create() for attribute "to" was called twice and the 1st object was lost.
* Parse stanza-idMichael Vetter2020-07-233-6/+40
| | | | | | | | | | | | Add stable stanza IDs to ProfMessage struct. We parse this for 1:1 messages (MUC needs to be done too). <stanza-id> for live messages <result id="x"> for MAM messages Regards MAM: https://github.com/profanity-im/profanity/issues/660 Regards Stable IDs: https://github.com/profanity-im/profanity/issues/1207
* ox review: Use english not germanMichael Vetter2020-07-101-5/+5
|
* OX: XEP-0373: OpenPGP for XMPP - Version 0.5.0 (2020-06-19)DebXWoody2020-07-102-3/+241
| | | | | | | | | | | Discovering Public Keys via PEP * 4.3 Discovering Public Keys of a User * 4.4 Requesting Public Keys * Import Public Keys into GnuPG's local keyring. Issue: #1331
* Apply coding styleMichael Vetter2020-07-0739-3203/+3233
|
* OX: Fix testsMichael Vetter2020-07-071-1/+2
| | | | | | | | Fix: ``` /usr/bin/ld: src/xmpp/ox.o: in function `ox_announce_public_key': src/xmpp/ox.c:90: undefined reference to `p_ox_gpg_readkey' ```
* Revert "Apply coding style"Michael Vetter2020-07-0739-3321/+3295
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-0739-3295/+3321
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* OX: Announce public key on PEPDebXWoody2020-07-063-0/+287
| | | | | | | | | | | | | | | src/pgp/gpg.c:p_ox_gpg_readkey Used to read a public key from a file. The function will return the fingerprint of the file and the base64 encoded key. src/xmpp/ox.[hc] ox_announce_public_key(const char* const filename) can be called from the /ox announce <filename> command. The key within the file will be pushed on PEP and the Metadata node will be set. Issue: #1331
* Merge branch 'omemofix'Michael Vetter2020-07-041-20/+39
|\
| * Messages are not shown in ChatSecureDebXWoody2020-07-041-20/+39
| | | | | | | | | | | | | | | | In 0.9.x we fixed an issue, because OMEMO devices should be defined in "item" with id "current". This should work, but it won't work if there is no "current". If there is no "current" we will just use the first item. Issue #1384
* | message.c: Use message->to_jid instead of to_jidMichael Vetter2020-07-031-1/+1
| | | | | | | | This one will always be set.
* | message.c: _handle_carbons() check from field outside of functionMichael Vetter2020-07-031-15/+17
| | | | | | | | | | So that we don't have to pass the wrapping stanza and can handle the error nicer.
* | message.c: Dont duplicate code in _handle_carbon and _handle_chatMichael Vetter2020-07-031-111/+66
| | | | | | | | | | Trying to simplify the conditions so we don't have duplicate code in both of those functions.
* | message.c: Remove from/to setting out of conditionMichael Vetter2020-07-031-6/+3
| | | | | | | | Since its done in both cases.
* | message.c: Small code improvementsMichael Vetter2020-07-031-16/+16
| |
* | message.c: Put XEP-0085 code in helper functionMichael Vetter2020-07-031-18/+25
| |
* | Change formattingMichael Vetter2020-07-031-1/+2
| |
* | handle_headline(): Free text correctlyMichael Vetter2020-07-031-0/+2
| |
* | Handle headline stanzaStefan Kropp2020-07-031-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Authored by DebXWoody in: https://github.com/profanity-im/profanity/pull/1369 Regards: https://github.com/profanity-im/profanity/issues/1366 Since I'm in the process of cleaning up message.c I take this now so he doesn't have to rebase. I also omitted the _handle_normal() case since I'm not sure that would be correct. Probably will be addressed again when continuing the cleanup.
* | Fix messages with receipt request not displayedWilliam Wennerström2020-07-021-1/+0
| | | | | | | | | | | | | | | | Messages from Conversations contains: <request xmlns='urn:xmpp:receipts'/> And would not be displayed in Profanity as it never reached _handle_chat(..).
* | message.c: Put plugin handler code in helper functionMichael Vetter2020-07-021-7/+14
| |
* | message.c: Log invalid message typeMichael Vetter2020-07-021-14/+14
| | | | | | | | | | So far we logged when we receive a message without a type. Which is actually quite common and makes no sense.
* | message.c: Check for message typeMichael Vetter2020-07-022-8/+5
| | | | | | | | | | RFC 6121 allows only few types. So we can also remove that check in _handle_chat().
* | message.c: Remove handled cases form _handle_chat()Michael Vetter2020-07-021-7/+0
| | | | | | | | Both cases are tested before entering that function.
* | message.c: Break out of _message_handler() after handling codeMichael Vetter2020-07-021-0/+4
| | | | | | | | | | AFAIK it can only be one. Except at STANZA_NS_MUC_USER which is used in several cases.
* | Add HEADLINE stanza defineMichael Vetter2020-07-021-0/+1
| |
* | message.c: Parse incoming message stanzas according to typeMichael Vetter2020-07-021-31/+34
| |
* | message.c: Add pubsub helper functionMichael Vetter2020-07-021-13/+19
| |
* | message.c: Add XEP informationMichael Vetter2020-07-021-1/+6
| |
* | message.c: Add my copyrightMichael Vetter2020-07-021-0/+1
| |
* | message.c: Make several functions staticMichael Vetter2020-07-021-3/+3
| |
* | message.c: Adjust function formattingMichael Vetter2020-07-021-8/+12
| |
* | Remove prefs_free_string()Michael Vetter2020-07-021-3/+3
|/ | | | | It just does a free. Related to b580b9ef119045f142fa4baa9689a1c5ce8864ef
* And ifdefs around new OX functionsMichael Vetter2020-06-301-7/+10
| | | | | Fix for some build cases introduced in 2c94ee5a88f64332a3f41f41a4d314fc52200e31 Fix https://github.com/profanity-im/profanity/issues/1376
* Feature request - XEP-0373: OpenPGP for XMPP (OX)DebXWoody2020-06-293-1/+178
| | | | | | | | | Basic implementation of XEP-0373: OpenPGP for XMPP. https://xmpp.org/extensions/xep-0373.html Command /ox Issue: #1331
* Fix possible segfault in xmpp/message.cDmitry Podgorny2020-06-161-1/+1
| | | | Check for pointer to be NULL before dereferencing it.
* Fix reading/writing linked filesMichael Vetter2020-06-131-1/+1
| | | | | | "base" was not really base but the filename :-) Fix https://github.com/profanity-im/profanity/issues/1362
* Make legacy auth optionalDmitry Podgorny2020-06-111-0/+9
| | | | | | | | Some systems don't provide recent libstrophe releases. When older version of libstrophe is detected, don't build legacy auth support. To simplify this patch, report about unsupported legacy auth and keep commands option as is.
* Add option for legacy authenticationDmitry Podgorny2020-06-054-13/+44
| | | | | | | | New options: /connect <account> [auth default|legacy] /account <account> set auth default|legacy Fixes #1236.