about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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-021-8/+4
| | | | | 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.
* 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
|