about summary refs log tree commit diff stats
path: root/src/xmpp/stanza.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge MAM improvements from #1724Michael Vetter2022-10-211-22/+83
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this PR already solves and improves the MAM situation a lot. What's @MarcoPolo-PasTonMolo still wanted to do in this branch is: * MAM for mucs * Check if url and quotes autocompletion works fine * Check if the api still works fine * Resolve conflicts Conflicts are solved with this commit. MAM for mucs can be another feature PR. The rest we can check while being on master. And more people can help testing.
| * Fix initial MAM not displayingMarcoPolo-PasTonMolo2022-07-051-10/+20
| | | | | | | | | | | | Did this by waiting for a batch of MAM messages to arrive before prepending them to the buffer. Also limited the number of messages to fetch to 10 so that the user gets more frequent updates.
| * On new chatwin fetch mam according to guidelines.MarcoPolo-PasTonMolo2022-07-031-19/+70
| | | | | | | | | | Taken from here: https://github.com/modernxmpp/modernxmpp/commit/cd3e871e55c2cff45dffd05d6e50380b99845849
* | Add vCard supportMarouane L2022-10-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported Due to the synopsis array not having enough space, `/vcard photo open-self` and `/vcard photo save-self` are not documented properly in the synopsis section of the `/vcard` command, but they are documented in the arguments section Fixed memory leak in vcard autocomplete (thanks to debXwoody)
* | Format Maxis commit properlyMichael Vetter2022-09-291-1/+1
| |
* | Use G_GSIZE_FORMAT instead of "%lu" for portabilityMaxi Wuttke2022-09-291-1/+1
| | | | | | | | | | | | In the function stanza_create_avatar_metadata_publish_iq, use the format string `"%"G_GSIZE_FORMAT` instead of "%lu", for an argument of type gsize.
* | stanza: remove strange assignmentMichael Vetter2022-06-291-1/+1
|/
* Add `/avatar set` command to publish avatarMarcoPolo-PasTonMolo2022-05-261-0/+101
| | | | | | | | Use `/avatar set <path>` where <path> is an image file to upload a new avatar for the current user. When the avatar is too big it gets scaled down. Scaling code copied from dino. Fixes https://github.com/profanity-im/profanity/issues/1687
* auto-formatSteffen Jaeckel2022-02-011-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* first step to remove libmesodeSteffen Jaeckel2021-10-271-6/+0
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Format new register code correctlyMichael Vetter2021-10-131-1/+0
|
* Merge pull request #1574 from binex-dsk/masterMichael Vetter2021-10-131-0/+38
|\ | | | | | | Add in-band account registration Fix https://github.com/profanity-im/profanity/issues/199
| * registration: memory leaks, error checkingswirl2021-10-131-2/+1
| |
| * hacky fix(?) for registerswirl2021-08-171-1/+2
| | | | | | | | very bad and spaghetti will fix later
| * fixed some bugs, added some moreswirl2021-08-171-0/+3
| | | | | | | | | | | | | | | | | | - Added JABBER_RAW_CONNECT[ING/ED] connection states - Added cl_ev_connect_raw and session_connect_raw to conform to normal connection functions - Fixed SIGABRT during registration - Added a check in cmd_register to ensure it's actually connected before registering--but this will always fail atm
| * initial register command testswirl2021-08-171-0/+35
| |
* | Format code correctlyMichael Vetter2021-10-051-6/+4
| |
* | Fix history timestampMarcoPolo-PasTonMolo2021-10-051-6/+6
|/ | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1423 Oldest stanza is fetched like before but now the timestamp is generated by creating date_time_from_iso8601 and then to_local, instead of trusting that the timestamp is in utc. The procedure previously was stamp = time_val_from_iso8601() then date_time = date_time_from_utc(stamp) then local_date_time = to_local(date_time)
* XEP-0157: Print all available addressesMichael Vetter2021-06-301-5/+18
|
* XEP-0157: Print contact addressesMichael Vetter2021-06-301-3/+10
|
* XEP-0157: Parse contact address stanzaMichael Vetter2021-06-291-0/+31
|
* Get rid of asprintf and _GNU_SOURCE defineMichael Vetter2021-03-301-5/+3
| | | | | | | _GNU_SOURCE was even in some files where it was not needed at all (http*). Let's replace asprintf() with g_strdup_printf().
* stanza: simplify stanza_get_muc_destroy_alternative_roomMichael Vetter2021-03-251-4/+1
|
* stanza: replae strcmp with g_strcmp0Michael Vetter2021-03-251-17/+17
| | | | since its NULL safe
* Add support to register with a roomMichael Vetter2021-03-251-0/+15
| | | | | | | | | | `/affiliation register` can now be used to register a nickname with a MUC. Tested with a server without forms. Couldn't find a server which supports forms yet. Implements https://github.com/profanity-im/profanity/issues/1210
* Add support to approve MUC voice requestsMichael Vetter2021-03-171-0/+15
| | | | | | 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/+58
| | | | closes https://github.com/profanity-im/profanity/issues/1211
* Merge pull request #1501 from xenrox/change-passwordMichael Vetter2021-03-111-0/+37
|\ | | | | Add command to change password of logged in user
| * Add command to change password of logged in userThorben Günther2021-03-111-0/+37
| |
* | Update to the newest version of XEP 0363 (HTTP Upload)Maximilian Wuttke2021-03-111-26/+5
|/ | | | | | | | | | | | | Main changes: 1. Attributes instead of tags 2. Read the optional <header> tags and send them in the HTTP PUT header: * Authorization * Cookie * Expires Co-authored-by: Martin Dosch <martin@mdosch.de>
* Variadic version of `stanza_attach_publish_options`Maximilian Wuttke2021-03-091-15/+34
|
* wip: add rsm after we get the first couple of mam messagesMichael Vetter2021-01-281-1/+26
|
* Declare counter var inside loopMichael Vetter2020-11-091-8/+4
| | | | We require c99/gnu99 anyways.
* Replace stanza_get_child_by_name_and_ns with ↵Michael Vetter2020-09-301-20/+0
| | | | | | | | 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.
* Apply coding styleMichael Vetter2020-07-071-511/+505
|
* Revert "Apply coding style"Michael Vetter2020-07-071-511/+517
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-517/+511
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Fix potential memleak in stanza_create_caps_from_query_element()Michael Vetter2020-04-201-4/+12
| | | | | Each of those should only occur one time. But let's make sure we only write/alloc one time to be on the safe side.
* First MAM testMichael Vetter2020-04-111-0/+82
| | | | | | Send a request (which we can't handle yet) :-) Regards https://github.com/profanity-im/profanity/issues/660
* Fix use-after-free in stanza_create_caps_from_query_element()Dmitry Podgorny2020-04-091-4/+8
| | | | | | | | | The function creates a form to find such strings as software, os, etc. It remembers the strings allocated by form_create() and use them below in caps_create(). The issue is that the form is destroyed before and as result the strings are freed too. As solution, allocate own copy of strings.
* 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 memleak in stanza_get_oldest_delayMichael Vetter2020-02-251-2/+14
| | | | We need to unref the temp datetimes again.
* xep-0308: Implement `/correct` to correct the last send messageMichael Vetter2020-02-101-0/+12
| | | | | | | | 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.
* avatar: use unique id for stanza idMichael Vetter2020-02-071-3/+3
| | | | "retrieve1" should have been only for testing.
* 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-301-1/+30
| | | | | | | | | | | | | | | | | | 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.
* Fix typo in commentMichael Vetter2020-01-231-1/+1
|
* xep-0084: Download avatarsMichael Vetter2019-12-181-0/+31
| | | | | Proof of concept. Needs error checking, a nice interface, general cleanup..