Michael Vetter
4d4c094b5f
Enable _handle_ox_chat() payload/body decryption
...
This part of the code was waiting for xmpp_stanza_new_from_string() from
libstrophe 0.10.0.
2020-10-09 09:38:47 +02:00
Michael Vetter
17b1b431f5
Replace stanza_get_child_by_name_and_ns with 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.
2020-09-30 19:41:08 +02:00
Michael Vetter
0a9200e268
Require libstrophe/libmesode 0.10.0
2020-09-30 19:30:40 +02:00
Dmitry Podgorny
7553676b40
Fix memory leak in _handle_chat()
...
jid_create() for attribute "to" was called twice and the 1st object was
lost.
2020-08-07 00:47:45 +03:00
Michael Vetter
8852db03d6
Parse stanza-id
...
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
2020-07-23 14:21:27 +02:00
Michael Vetter
d7b7f54782
ox review: Use english not german
2020-07-10 13:41:48 +02:00
DebXWoody
0552e50c78
OX: XEP-0373: OpenPGP for XMPP - Version 0.5.0 (2020-06-19)
...
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
2020-07-10 13:40:00 +02:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +02:00
Michael Vetter
bddbfa58c0
OX: Fix tests
...
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'
```
2020-07-07 14:07:38 +02:00
Michael Vetter
a4cadf78fa
Revert "Apply coding style"
...
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2.
Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0
Apply coding style
...
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
DebXWoody
5a17957253
OX: Announce public key on PEP
...
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
2020-07-06 13:19:18 +02:00
Michael Vetter
bf170d6c91
Merge branch 'omemofix'
2020-07-04 17:38:44 +02:00
DebXWoody
54667c022f
Messages are not shown in ChatSecure
...
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
2020-07-04 17:38:30 +02:00
Michael Vetter
aecbeff8ba
message.c: Use message->to_jid instead of to_jid
...
This one will always be set.
2020-07-03 18:04:07 +02:00
Michael Vetter
b1343cd3ac
message.c: _handle_carbons() check from field outside of function
...
So that we don't have to pass the wrapping stanza and can handle
the error nicer.
2020-07-03 17:55:15 +02:00
Michael Vetter
896e6c4e87
message.c: Dont duplicate code in _handle_carbon and _handle_chat
...
Trying to simplify the conditions so we don't have duplicate code
in both of those functions.
2020-07-03 17:51:42 +02:00
Michael Vetter
8ce299838d
message.c: Remove from/to setting out of condition
...
Since its done in both cases.
2020-07-03 16:38:05 +02:00
Michael Vetter
0412ec9662
message.c: Small code improvements
2020-07-03 16:26:33 +02:00
Michael Vetter
c66d3c6389
message.c: Put XEP-0085 code in helper function
2020-07-03 16:17:18 +02:00
Michael Vetter
14f33e54f6
Change formatting
2020-07-03 12:35:48 +02:00
Michael Vetter
8d8ef675cd
handle_headline(): Free text correctly
2020-07-03 12:05:46 +02:00
Stefan Kropp
3640900cf6
Handle headline stanza
...
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.
2020-07-03 12:02:41 +02:00
William Wennerström
d5aae08c41
Fix messages with receipt request not displayed
...
Messages from Conversations contains:
<request xmlns='urn:xmpp:receipts'/>
And would not be displayed in Profanity as it never reached
_handle_chat(..).
2020-07-02 20:50:26 +02:00
Michael Vetter
83ed9ba24b
message.c: Put plugin handler code in helper function
2020-07-02 17:53:28 +02:00
Michael Vetter
6be5b51a46
message.c: Log invalid message type
...
So far we logged when we receive a message without a type. Which is
actually quite common and makes no sense.
2020-07-02 17:47:07 +02:00
Michael Vetter
46a00317ee
message.c: Check for message type
...
RFC 6121 allows only few types.
So we can also remove that check in _handle_chat().
2020-07-02 17:40:58 +02:00
Michael Vetter
19d9e80a79
message.c: Remove handled cases form _handle_chat()
...
Both cases are tested before entering that function.
2020-07-02 17:32:14 +02:00
Michael Vetter
d9cfa2e48a
message.c: Break out of _message_handler() after handling code
...
AFAIK it can only be one.
Except at STANZA_NS_MUC_USER which is used in several cases.
2020-07-02 17:31:56 +02:00
Michael Vetter
ad3dd72325
Add HEADLINE stanza define
2020-07-02 17:17:28 +02:00
Michael Vetter
b14b711492
message.c: Parse incoming message stanzas according to type
2020-07-02 17:15:42 +02:00
Michael Vetter
728cb55b68
message.c: Add pubsub helper function
2020-07-02 16:48:57 +02:00
Michael Vetter
f2b415079a
message.c: Add XEP information
2020-07-02 16:37:20 +02:00
Michael Vetter
1f50647865
message.c: Add my copyright
2020-07-02 15:22:58 +02:00
Michael Vetter
3350139ed0
message.c: Make several functions static
2020-07-02 15:21:54 +02:00
Michael Vetter
10190b5fb0
message.c: Adjust function formatting
2020-07-02 15:20:17 +02:00
Michael Vetter
e5ac12afa6
Remove prefs_free_string()
...
It just does a free.
Related to b580b9ef119045f142fa4baa9689a1c5ce8864ef
2020-07-02 11:34:12 +02:00
Michael Vetter
8de6a7bfb0
And ifdefs around new OX functions
...
Fix for some build cases introduced in 2c94ee5a88f64332a3f41f41a4d314fc52200e31
Fix https://github.com/profanity-im/profanity/issues/1376
2020-06-30 11:10:27 +02:00
DebXWoody
2c94ee5a88
Feature request - XEP-0373: OpenPGP for XMPP (OX)
...
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html
Command /ox
Issue: #1331
2020-06-29 19:05:41 +02:00
Dmitry Podgorny
409bbd6f2d
Fix possible segfault in xmpp/message.c
...
Check for pointer to be NULL before dereferencing it.
2020-06-16 17:52:01 +03:00
Michael Vetter
914c6752dd
Fix reading/writing linked files
...
"base" was not really base but the filename :-)
Fix https://github.com/profanity-im/profanity/issues/1362
2020-06-13 15:02:43 +02:00
Dmitry Podgorny
424918c5ed
Make legacy auth optional
...
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.
2020-06-11 02:51:07 +03:00
Dmitry Podgorny
ac410445af
Add option for legacy authentication
...
New options:
/connect <account> [auth default|legacy]
/account <account> set auth default|legacy
Fixes #1236 .
2020-06-05 11:37:51 +03:00
Pierre Mazière
d92c576aa5
Get output and error streams from the command spawned by external_call()
...
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-03 13:09:29 +02:00
Michael Vetter
e19bf0e303
Merge branch 'bugfix/1329'
2020-05-29 10:29:20 +02:00
Michael Vetter
24e8243a98
_omemo_receive_devicelist() use if/else
2020-05-29 10:28:41 +02:00
Michael Vetter
8d9cbef1e3
Merge pull request #1343 from DebXWoody/bugfix/1333
...
Incoming iq stanza - Reset the autoping timer
2020-05-29 10:21:51 +02:00
Michael Vetter
d4692b1b2d
Fix carbon logging
...
Regards https://github.com/profanity-im/profanity/issues/1342
2020-05-27 22:06:04 +02:00
Michael Vetter
de8975c008
Add and use connection_get_barejid()
...
Instead of connection_get_fulljid() and then creating a Jid from it.
2020-05-25 13:04:19 +02:00
Michael Vetter
a2af4c3184
Fix memleak in bookmark minimize
...
Introduced in 36f2569e53e67fda6023c5ec5f6a7714cbce1946
2020-05-24 13:35:09 +02:00