about summary refs log tree commit diff stats
path: root/src/xmpp
Commit message (Collapse)AuthorAgeFilesLines
...
* xep-0308: correct incoming MUC PMsMichael Vetter2020-02-121-0/+14
|
* xep-0308: Display corrected incoming MUC messages correctlyMichael Vetter2020-02-121-0/+10
|
* xep-0308: enable corrections for outgoing encrypted messagesMichael Vetter2020-02-122-6/+18
|
* xep-0308: Implement `/correct` to correct the last send messageMichael Vetter2020-02-104-4/+19
| | | | | | | | So far the correction is sent. But the UI in Profanity itself is not updated. Also autocompletion for `/correct` with the last sent message is missing.
* xep-0308: create setting to toggle lmcMichael Vetter2020-02-101-2/+7
| | | | and print settings if only `/correction` is run.
* xep-0308: Initial support for incoming LMCMichael Vetter2020-02-104-0/+25
|
* avatar: use unique id for stanza idMichael Vetter2020-02-073-7/+10
| | | | "retrieve1" should have been only for testing.
* Add context to autocomplete_with_func and use it for omemo trust commandPaul Fariello2020-01-318-18/+18
| | | | Fix #1068
* fix: Initialize variable in stanza_get_oldest_delay()Michael Vetter2020-01-301-1/+1
|
* Fix error in stanza_get_oldest_delay()Michael Vetter2020-01-301-3/+3
| | | | Introduced in bf2e09feee1697c570fcfb9e1e44a8ec991bd196.
* muc: save oldest timestampMichael Vetter2020-01-303-3/+38
| | | | | | | | | | | | | | | | | | So far we saved the timestamp which also had the `from`. But we need this only to find out whether it's MUC history. For displaying we should use the oldest delay timestamp. Also in https://github.com/profanity-im/profanity/commit/61f66966ddfe8ebd8bae26dd7ff92d777004edda#diff-4926fd4577a336bd3eb240f8104a5c5bL837 a error was introduced. Before we saved the timestamp in all cases. And only if timestamp AND from was given we went into MUC history case. Normal timestamp saving was not done anymore only if it also had a from attribute. Regards https://github.com/profanity-im/profanity/issues/1254
* stanza: Refactor stanza_get_delay_from()Michael Vetter2020-01-301-26/+49
| | | | Have two helper functions one for XEP-0203 and one for XEP-0091.
* Revert "Save first delay tag as timestamp"Michael Vetter2020-01-281-9/+0
| | | | | | | | This reverts commit ef00b10c90aef8b75415fae558789d21bb975d75. According to reply by user in https://github.com/profanity-im/profanity/issues/1254#issuecomment-578389784 it didn't help.
* Save first delay tag as timestampMichael Vetter2020-01-241-0/+9
| | | | | | | | | | | | So far we got the first delay with a from that comes from the server. This way we know it's MUC history. Now we take the first time stamp we actually find. Which is likely the one being added first. And should contain the correct time to display. It would be nicer to actually compare the dates though. Regards https://github.com/profanity-im/profanity/issues/1254
* Fix typo in commentMichael Vetter2020-01-231-1/+1
|
* xep-0092: add config option to set whether OS is revealedMichael Vetter2020-01-231-14/+22
| | | | | | Default is on. `revail.os=false` in the `connection` section of the config can disable it. A command to configure this will follow.
* xep-0092: send OS tooMichael Vetter2020-01-231-0/+23
| | | | | So far we only sent client name and version. Let's also send the OS name.
* Add option to notify about version requestMichael Vetter2020-01-231-0/+8
| | | | | | | | | | Cannot be configured for now. Can be set via `adv.notify.discoversion` in the `notification` section. Will notify about version requests via XEP-0092 and XEP-0232. Client version can still be seen via caps (capabilities). See `stanza_attach_caps()`.
* Save MUC room name in ProfMucWinMichael Vetter2020-01-231-0/+4
| | | | We will need this if we want to display the Name instead of the JID.
* xep-0084: use hash table for avatar lookupMichael Vetter2020-01-221-8/+11
|
* Fix maybe uninitialized and don't guard g_freePaul Fariello2020-01-201-17/+14
|
* Ignore invalid base64 in OMEMO stanzasPaul Fariello2020-01-201-10/+44
| | | | Fixes #1239
* Use OMEMO for offline MUC members (#1242)Paul Fariello2020-01-205-9/+99
|
* Merge pull request #1248 from svensp/masterMichael Vetter2020-01-051-1/+3
|\ | | | | OMEMO message keys allow prekey="1" alongside prekey="true"
| * omemo: Check for `1` alongside `true` in an omemo encrypted message stanzaSven Speckmaier2020-01-031-1/+3
| | | | | | | | | | | | | | | | prekey is defined as `<xs:attribute name="prekey" type="xs:boolean"/>` which allows both `true` and `1` as truthy values. Not checking for `1` breaks omemo encryption when interacting with clients which set prekey="1", example: psi+ 1.4.983 Regards https://github.com/profanity-im/profanity/issues/1247
* | Update my Copyright to 2020Michael Vetter2020-01-034-4/+4
|/
* Add comments to avatar.cMichael Vetter2019-12-231-8/+11
| | | | And use better function names.
* Add string.h to avatars.cMichael Vetter2019-12-191-0/+1
| | | | Regards https://github.com/profanity-im/profanity/issues/1241
* Include stdlib.h in avatar.cMichael Vetter2019-12-191-0/+1
| | | | | | We use malloc() and free(). Fix https://github.com/profanity-im/profanity/issues/1241
* xep-0084: add test stub fileMichael Vetter2019-12-182-2/+2
|
* Add header file guard to avatar.hMichael Vetter2019-12-181-0/+5
|
* xep-0084: make internal functions staticMichael Vetter2019-12-181-8/+8
|
* xep-0084: move id to avatar_metadataMichael Vetter2019-12-181-12/+12
|
* xep-0084: Add correct file extensionMichael Vetter2019-12-181-9/+41
|
* xep-0084: Normalize at out of image filenameMichael Vetter2019-12-181-1/+3
|
* xep-0084: Improve helpMichael Vetter2019-12-181-1/+1
|
* xep-0084:Michael Vetter2019-12-181-0/+4
| | | | | | | | | | | | So far we removed the avatar feature only after a succesful retrive in avatar_request_item_by_id() before we are going to retrieve the actual image. We should remove it at every `/avatar barejid` call too so in case one retrieval was unsucessful that we can call it again. So far it seems like there is no other way to trigger getting the nodes except announcing that we support the avatar feature.
* Fix headerMichael Vetter2019-12-182-2/+2
|
* xep-0084: save avatars in own directoryMichael Vetter2019-12-181-4/+20
|
* xep-0084: Make it work multiple timesMichael Vetter2019-12-181-0/+4
|
* xep-0084: Download avatarsMichael Vetter2019-12-183-3/+113
| | | | | Proof of concept. Needs error checking, a nice interface, general cleanup..
* xep-0084: Look for specific user and print IDMichael Vetter2019-12-182-1/+22
| | | | Add a `/avatar` command.
* Start implementing XEP-0084Michael Vetter2019-12-184-0/+137
| | | | So far we just subscribe and get the IDs.
* Fix stanza_get_child_by_name_and_from() strcmpMichael Vetter2019-11-141-1/+3
| | | | Fix https://github.com/profanity-im/profanity/issues/1227
* Add vim modelineMichael Vetter2019-11-1337-0/+105
|
* Check for correct delay tag for muc timestampsMichael Vetter2019-11-133-19/+42
| | | | | | | | | | | | | https://github.com/profanity-im/profanity/issues/1190 had another issue: Sometimes servers send multiple </delay> and we just checked the first one we got and only used it if the 'from' attribute was fitting. However it could be that we actually wanted the second </delay> element and there the 'from' would have been right. So we need to loop through them until we get the one with the fitting 'from'. Fix https://github.com/profanity-im/profanity/issues/1190
* Fix stanza_get_child_by_name_and_ns() if no nameMichael Vetter2019-11-121-1/+3
| | | | Fix bug introduced in 68af0aad65d243e654866eac5a7cd728ee293aa0.
* _handle_groupchat(): get correct origin-id stanzaMichael Vetter2019-11-083-2/+22
| | | | | | | | | | | | | | | | | | The problem is that in _handle_groupchat() we look for STANZA_NS_STABLE_ID which will result in origin-id or stanza-id. It seems like prosody servers send origin-id first, so this worked in all my tests. But actually we cannot be sure of the order. So far we stopped after the first element was found. I only found xmpp_stanza_get_child_by_ns() and xmpp_stanza_get_child_by_name() in libstrophe. But we need a combination of both. So I created stanza_get_child_by_name_and_ns() for Profanity. I need to remember to upstream this to libstrophe later (if they really don't have such a function). Fix https://github.com/profanity-im/profanity/issues/1223
* Don't override ProfMessage Id with origin-idMichael Vetter2019-10-312-19/+43
| | | | | | | | | | Profanity sends the same value for both. Other clients might not. Safe both since we could need them later. Once we implement Last Message Correction we will need the regular id. If we override it with origin-id and another client chooses to not use the same value for id and origin-id then we can't interpret the id sent with the LMC request correctly.
* omemo: Check stanza names when iterating nodesaszlig2019-10-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some clients (eg. PSI) are sending the stanzas delimited by whitespace text nodes, which will fail while looping through the <prekeys/> children and also print weird errors when iterating through the <list/> of devices. When debugging this, I was looking at the XML of Gajim and PSI and first was somehow confused why Profanity printed "OMEMO: received device without ID" while the XML looked identical (minus the actual IDs and the JIDs of course). However, Gajim was sending the XML without whitespace nodes in between and PSI did not, so for example the following (with the relevant whitespace nodes marked with X): <message type="headline" to="..." from="..."> <event xmlns="http://jabber.org/protocol/pubsub#event"> <items type="headline" node="eu.siacs.conversations.axolotl.devicelist"> <item id="..."> <list xmlns="eu.siacs.conversations.axolotl"> X <device id="..."/> X <device id="..."/> X </list> </item> </items> </event> <delay xmlns="urn:xmpp:delay" stamp="..." from="..."/> </message> ... would result in three times the "OMEMO: received device without ID" error, because we actually have three XML text nodes here that obviously don't have an "id" attribute. Now since the <list/> children above aren't really a problem and only annoying, text nodes in the <prekeys/> stanza actually cause omemo_start_device_session_handle_bundle to return failure. I've fixed this by explicitly matching the stanza names we are interested in, skipping everything else. Signed-off-by: aszlig <aszlig@nix.build> Reported-by: @devhell