about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update copyrightMichael Vetter2021-01-081-1/+1
|
* 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.
* 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-301-4/+4
| | | | | | | | 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.
* 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-231-5/+34
| | | | | | | | | | | | 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
* Apply coding styleMichael Vetter2020-07-071-272/+272
|
* Revert "Apply coding style"Michael Vetter2020-07-071-278/+278
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-278/+278
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* 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.