about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
Commit message (Collapse)AuthorAgeFilesLines
* ox: add helper message in case signcrypt doesnt workMichael Vetter2022-06-291-0/+1
| | | | | Most likely they didnt trust/sign the key. Which is described in the profanity-ox-setup man page.
* Split ox functions from gpg.c to ox.cMichael Vetter2022-06-291-0/+1
|
* Merge pull request #1717 from ↵Michael Vetter2022-06-111-0/+8
|\ | | | | | | | | MarcoPolo-PasTonMolo/fix/chat-with-self-duplicate-msgs Fix duplicate messages in chat with oneself.
| * Fix duplicate messages in chat with oneself.MarcoPolo-PasTonMolo2022-05-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Messages would get duplicated when you chat with yourself, worse if you had omemo enabled the duplicated message would say something along the lines of "Your client doesn't support OMEMO". The cause was carbons when the message was sent from another client, whilst it was a sent and received message when profanity was the one to send it. This commit ignores the carbon message in the 1st case and ignores the received one in the 2nd. Fixes https://github.com/profanity-im/profanity/issues/1595
* | Make muc config update after form submitMarcoPolo-PasTonMolo2022-05-271-0/+45
|/ | | | | | | | | Muc configuration in profanity used to not update until next login, ie: make muc non_anonymous and members_only but be unable to start omemo until next login. Now a disco info request is sent after forrm submit and chatroom details are changed accordingly. Fixes https://github.com/profanity-im/profanity/issues/1347
* Update copyright yearMichael Vetter2022-05-091-1/+1
|
* ox: only process proper messagesMichael Vetter2022-05-041-12/+11
| | | | | | | | | | We only want to have the decrypted message or the alternative body in message->plain. Also let's print error messages if it makes sense and log other issues. Partly addresses the commit in the comit mesage of: 2dc0cc489c872941e18a622c091f74bf5b0b043f
* ox: prefix function _openpgp_signcrypt with ox_Michael Vetter2022-05-041-3/+3
| | | | To make the destinction clearer and easier to search.
* Bugfix OX rpad generationStefan Kropp2022-05-031-4/+6
| | | | | | | | | | ________________________________________ < No comment - should be much better now > ---------------------------------------- \ \ \ >()_ (__)__ _
* ox: dont print empty body messageMichael Vetter2022-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | Fix https://github.com/profanity-im/profanity/issues/1693 ``` @StefanKropp @DebXWoody please check `_handle_ox_chat()` I don't understand what you are doing there. 1) First plain is assigned `message->plain = p_ox_gpg_decrypt(xmpp_stanza_get_text(ox));` and then in the same if block you overwrite this with `message->plain = xmpp_stanza_get_text(b);` without freeing the old value as far as I can see. 2) Sometimes even doing `message->plain = "OX error: No payload found";`. Shouldn't there be a `strdup()`? I think later on we try to free the whole message struct. So we can't mix this static things. ```
* ox: remove commentMichael Vetter2022-04-271-4/+0
|
* Fix typo: paylod -> payloadMichael Vetter2022-04-121-1/+1
|
* Fix typos in commentsMichael Vetter2022-02-181-1/+1
|
* Merge branch 'master' into xep/xep0107-user-moodMichael Vetter2021-12-061-2/+8
|\
| * Fix carbons criteriaMichael Vetter2021-11-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add xep-0107: User Mood supportDebXWoody2021-12-061-1/+8
|/ | | | Implementation of XEP 0107 - User Mood
* first step to remove libmesodeSteffen Jaeckel2021-10-271-6/+0
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Merge pull request #1566 from DebXWoody/bugfixing/oxMichael Vetter2021-07-011-36/+38
|\ | | | | Bugfixes for OX implementation
| * OX bug fixDebXWoody2021-07-011-18/+17
| | | | | | | | | | * Help / message description * C-Code format
| * OX bug fixingDebXWoody2021-06-291-6/+7
| | | | | | | | | | * Don't decryption if there is no private key * Decryption error messages
| * Bugfixes for OX implementationDebXWoody2021-06-281-27/+29
| | | | | | | | | | | | | | * autocomplete for /ox discover * fixed help description * Implemented /ox char command * Validated KeyID length
* | Add option to only allow messages from jids in rosterMichael Vetter2021-07-011-0/+22
|/ | | | | | | `/silence on` will throw away all messages (type: chat, normal) that come from jids that are not in the roster. Implement https://github.com/profanity-im/profanity/issues/955
* XEP-0353: Display a notice when receiving a callMichael Vetter2021-06-091-0/+23
| | | | | | Display a notice in the console when someone tries to call us. Implement https://github.com/profanity-im/profanity/issues/1525
* Message received without body error logDebXWoody2021-06-031-2/+2
| | | | | | | This is not an error, the message has no body because of XEP-0085: Chat State Notifications. Changed log level from error to info.
* Improved OMEMO loggingDebXWoody2021-05-281-0/+2
| | | | | | | | | | | The most loggings has been set to debug. Just in case of error / problem the logging should be done with log-level ERROR or WARNING. We will see later, which loggings should be switched to log-level INFO. This improvement has been done to find OMEMO bugs. See also: #1070 #1530 #1538
* message: correct type checkingMichael Vetter2021-05-141-1/+1
| | | | | Found by DebXWoody. Led to always be true (which still made it work in most cases).
* Goodbye beautiful IDsMichael Vetter2021-04-141-8/+6
| | | | | | | | | | | | | | | It was a great ride! IDs look instead of `TE5BTDc2ZTc3YTMwZGU3MDgzMzllOTliNGExNjVmMjZkMTY1ZmUyZGEyNTUxMjVmODBkMmQzOGMxYWI2ZjAxNzdiM2Q=` more like `7HcnNSoO1MVvb0p9a9e293152922853e910b8b1a65bb26e225a0568` now. Regards https://github.com/profanity-im/profanity/issues/1520 We still has our identifier into it to filter MUC reflected messages. profident maybe should be changed to be longer or be generated upon each start.
* message: parse stanzaid in MUC caseMichael Vetter2021-03-251-1/+9
| | | | | | | | | | | | | | | | | | There was a todo for this in message.c which got forgotten. This was most likely also the reason why there were NULL entries for this in the DB which DebXWoody mentioned in the MUC. Thus comparison was with NULL and no new entries were added to the database. Edit: After checking pull requests I see Stefans draft PR: https://github.com/profanity-im/profanity/pull/1505 So let's add him as co-author. Co-authored-by: Stefan Kropp <stefan@debxwoody.de>
* message: make _handle_error saferMichael Vetter2021-03-251-2/+4
|
* message: simplify _handle_headlineMichael Vetter2021-03-251-4/+2
|
* message: make _receipt_request_handler saferMichael Vetter2021-03-251-1/+1
|
* message: make _handle_receipt_received saferMichael Vetter2021-03-251-1/+5
|
* message: make _handle_groupchat saferMichael Vetter2021-03-251-0/+6
|
* message: simplify _handle_conferenceMichael Vetter2021-03-251-7/+5
|
* message: make _handle_form saferMichael Vetter2021-03-251-0/+3
|
* message: make _message_handler saferMichael Vetter2021-03-251-7/+9
|
* mesage: make _handle_ox_chat saferMichael Vetter2021-03-251-11/+27
| | | | And on the way fix a memleak
* message: make _handle_chat saferMichael Vetter2021-03-251-0/+3
|
* message: make _handle_muc_private_message saferMichael Vetter2021-03-251-0/+7
|
* message: fix potential segfault in _receipt_request_handlerMichael Vetter2021-03-251-3/+7
|
* message: safeguard _handle_receipt_receivedMichael Vetter2021-03-251-15/+17
| | | | | | This shouldnt be necessary since we check for the receipt outside alreayd. Let's be on the safe side though in case code gets changed later.
* message: reorder _handle_groupchatMichael Vetter2021-03-251-12/+9
|
* message: fix possible segfault in _handle_conferenceMichael Vetter2021-03-251-19/+23
|
* message: fix possible segfault in _handle_muc_userMichael Vetter2021-03-251-0/+4
|
* message: fix possible segfault in _message_handlerMichael Vetter2021-03-251-3/+3
|
* Add support to approve MUC voice requestsMichael Vetter2021-03-171-0/+34
| | | | | | A form will open. One can then use `/field4 on` `/form submit`. Implements https://github.com/profanity-im/profanity/issues/1507
* MUC: Add voice requestThorben Günther2021-03-121-0/+12
| | | | closes https://github.com/profanity-im/profanity/issues/1211
* Remove forgotten debug lineMichael Vetter2021-02-151-1/+0
|
* Use correct time for MAM messagesMichael Vetter2021-02-041-8/+17
| | | | | | We need the delay value from the <forward> element. Regards https://github.com/profanity-im/profanity/issues/660