about summary refs log tree commit diff stats
path: root/src/xmpp
Commit message (Collapse)AuthorAgeFilesLines
* db: log all incoming and outgoing messagesMichael Vetter2020-04-062-4/+4
|
* Rename PROF_MSG_ENC_PLAIN to PROF_MSG_ENC_NONEMichael Vetter2020-04-062-2/+2
|
* Add timestamp for incoming messages if none is setMichael Vetter2020-04-061-0/+6
| | | | | | | | Timestamps are only set if a message is delayed. If none is set let's set it upon recaival so we don't have to set it when it gets displayed. This means we will also have it for logs etc in the ProfMessage.
* Fix memory leak in stanza_attach_correction()Dmitry Podgorny2020-04-051-0/+1
| | | | | | xmpp_stanza_add_child() takes own reference to the child stanza. Therefore we have to release our reference or the child is lost and not freed otherwise.
* Fix memory leak of presence objectDmitry Podgorny2020-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The memory leak happens when a presence is received for a MUC room. The JID is not present in the roster, so updating its status is ignored. We have to free resource in this case, because it has no owner and is lost otherwise. ==25736== 47 (32 direct, 15 indirect) bytes in 1 blocks are definitely lost in loss record 1,625 of 3,399 ==25736== at 0x4A330FF: malloc (vg_replace_malloc.c:309) ==25736== by 0x13A962: resource_new (resource.c:47) ==25736== by 0x145501: _available_handler (presence.c:665) ==25736== by 0x145501: _presence_handler (presence.c:399) ==25736== by 0x145501: _presence_handler (presence.c:358) ==25736== by 0x80D5F34: handler_fire_stanza (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x80D2B49: _handle_stream_stanza (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x80E15CE: _end_element (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x843EE9B: doContent (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x843F94B: contentProcessor (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x8441E77: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x80D586B: xmpp_run_once (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x13E07E: connection_check_events (connection.c:119) ==25736== by 0x13869C: prof_run (profanity.c:129) Fixes #1279.
* xep-0084/avatar: add option to open avatar directlyMichael Vetter2020-03-102-3/+28
| | | | | | | | | | | Change: `/avatar me@somewhere.org` -> `/avatar get me@somewhere.org` New: `/avatar cmd feh` `/avatar open me@somewhere.org` Implement https://github.com/profanity-im/profanity/issues/1281
* Use correct MUC message timestampMichael Vetter2020-03-091-0/+7
| | | | | | | | win_println_incoming_muc_msg() always used the current time. Now let's use whatever is sent int he message struct (from the delay stanza or the current time that we set now once the message is received). No playing with the time upon display anymore.
* Use proper OS names for OpenBSD and NetBSDMichael Vetter2020-03-091-2/+2
|
* Fix few memory leaksDmitry Podgorny2020-02-271-0/+2
|
* Set muc history correctly in _handle_groupchat()Michael Vetter2020-02-251-1/+1
| | | | Fix init. mistake introduced in e9c5c1979d836ed75c37d48651710b4fd125cfb2
* Free jid in muc_members_add()Michael Vetter2020-02-251-0/+1
| | | | Fix memleak.
* Fix memleak in stanza_get_oldest_delayMichael Vetter2020-02-251-2/+14
| | | | We need to unref the temp datetimes again.
* Fix memleak in _handle_groupchat()Michael Vetter2020-02-251-1/+6
| | | | We need to unref the timestamp before setting a new one.
* Parse mentions and triggers in muc history if display is 'regular'Michael Vetter2020-02-202-2/+2
| | | | Fix https://github.com/profanity-im/profanity/issues/1261
* xep-0308: enable for carbon copied messagesMichael Vetter2020-02-141-0/+15
| | | | | | | If we are connected with another client and send a message, then correct it. We now display it correctly in Profanity. Id wasn't saved for carbon copied messages too so far.
* xep-0308: Implement LMC for outgoing MUC messagesMichael Vetter2020-02-142-2/+6
| | | | | | Including OMEMO encrypted ones. Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg() as I think it's a more descriptive name.
* Rename MUC PM handlerMichael Vetter2020-02-141-3/+3
| | | | | Rename from _private_chat_handler() to _handle_muc_private_message() to be more consistent with other handler names.
* xep-0308: Dont allow to correct MUC PMsMichael Vetter2020-02-141-8/+0
| | | | | People could change messages of other people if the nick isn't registered.
* 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
|