about summary refs log tree commit diff stats
path: root/src/xmpp
Commit message (Collapse)AuthorAgeFilesLines
* Profani-tty has rebornDaniel Santos2023-07-0146-208/+209
|
* Revert "Merge pull request #1821 from mdosch/use-proper-ellipsis-char"Daniel Santos2023-07-013-3/+3
| | | | | This reverts commit 19921f61c14095cadc55b329dd7c8f02bdc79d31, reversing changes made to ac581c29bfa7c31fbfb6fe8019d257d3883b33bb.
* Merge pull request #1842 from H3rnand3zzz/feature/plugins-downloadMichael Vetter2023-06-061-2/+1
|\ | | | | New Feature: Plugins Download
| * `/url save` and `/url open` refactoringJohn Hernandez2023-05-111-2/+1
| | | | | | | | Additional changes: jid.c minor refactoring
* | Fix double-free of values.Steffen Jaeckel2023-06-041-0/+6
| | | | | | | | | | | | | | | | | | | | The strings have to be dup'ed, otherwise we'll free them twice. Fixes #1855 Introduced by b6bb50ceb28250317351fd5115e3f187f0c56fba Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Fix use-after-freeSteffen Jaeckel2023-05-211-1/+3
| | | | | | | | | | | | | | | | introduced in 8d3c1f79ac7cc2b0830f0afed48dc1fb9008ab0e This fixes #1852 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Improve debug loggingSteffen Jaeckel2023-05-211-2/+4
| | | | | | | | | | | | | | Tell the user that a MAM request will be issued delayed instead of showing a warning that MAM isn't supported by the server. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Fix memleakSteffen Jaeckel2023-05-211-0/+1
| | | | | | | | | | | | introduced in 5d3c8ce7c164f74f606ff06d1adf849821591a51 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Fix `-Werror=maybe-uninitialized`Steffen Jaeckel2023-05-121-109/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling with `CFLAGS="-O2 -fexceptions -Wp,-D_FORTIFY_SOURCE=2"`, as done per default when creating an AUR package e.g. via `makepkg`, this error is produced. Refactor `stanza_create_mam_iq()` in order to fix said warning-turned-into- an-error. Edit by jubalh: I still think the error message is a false positive. But this commit improves the code a lot. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Fix potential double-freeSteffen Jaeckel2023-05-121-1/+1
| | | | | | | | | | | | introduced in 8d3c1f79ac7cc2b0830f0afed48dc1fb9008ab0e Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Merge branch 'master' into cleanup/gchar-charMichael Vetter2023-05-115-23/+24
|\ \
| * | fix memory leaksSteffen Jaeckel2023-05-102-21/+22
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * | fix `/reconnect now`Steffen Jaeckel2023-05-103-2/+2
| |/ | | | | | | | | | | | | This fixes #1846 Issue introduced by a0aa26b6fa65ba625f4a6d3495a345c7120ff16d Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* / Cleanup: gchar as gchar instead of charJohn Hernandez2023-05-045-52/+26
|/ | | | | | | | Use gchar instead of char in most of the cases where gchar is intended. Reason: improve compatibility and stability. Issue #1819 Minor refactoring.
* Add ability to disable avatar publishingIsaacM882023-05-024-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "/avatar disable" to comply with point "3.5 Publisher Disables Avatar Publishing" in XEP-0084. src/command/cmd_defs.c:2416 Add "disable" argument. Reword the "/avatar" command description so it flows better. src/command/cmd_ac.c:1101 Add "disable" to the "/avatar" autocomplete dictionary. src/command/cmd_funcs.c:9277 Split "/avatar" commands into two groups with an if statement; those with a parameter and those without. "cons_bad_cmd_usage()" is in both groups, which is messy. "disable" has similar logic to "set", but it includes a failure message. src/xmpp/avatar.c:152 "avatar_publishing_disable()" uses the same logic to publish metadata as in "avatar_set()". src/xmpp/avatar.c:238 Add a message to inform users when they do not receive an avatar after using "/avatar get" and "/avatar open". In case of a failure, the user will be subscribed to future avatar updates as long as they continue to use their current instance of profanity. Adding "caps_remove_feature()" after "cons_show()" will unsubscribe the user from avatar updates and prevent the user from downloading an avatar unexpectedly hours later without issuing an "/avatar" command. src/xmpp/stanza.c:2698 The new "disable" function follows the same logic as "stanza_create_avatar_metadata_publish_iq()".
* Fix memleak in stanza_create_caps_query_elementMichael Vetter2023-04-181-0/+3
| | | | Got introduced with 5d3c8ce7c.
* Add sessions_alarmJohn Hernandez2023-04-183-0/+71
| | | | | | | | | Introduce new feature: sessions_alarm. Added new account setting: max_connections. On exceeding this number, user will get an alert. If number is less than 1, no alert will happen. Tests altered to fit new feature.
* iq: initialize os and os_txtMichael Vetter2023-04-111-2/+2
| | | | | | | | | | | | Let's set this to NULL. Someone was using `picaur` and got an error about potential uninitialization. Even though the code is fine let's set this to NULL to make the compiler happy. The strange thing was that building manually on the same system worked. Related to 2e43b0ae62478bede34f6f52f73d22d671425f85.
* Fix releases of os and os_txt stanzasJohn Hernandez2023-04-101-3/+2
| | | | | | | | | | If custom client is not set and include_os is true, stanzas might be released without initializiting. This commit fixes it by introducing an additional check on usage of custom client. Related to commit e52ca2fbaa02acec3b2b757369ef5740e7a103da
* Merge pull request #1815 from H3rnand3zzz/feature/the-client-switcherMichael Vetter2023-04-092-53/+73
|\ | | | | Feature: Allow setting client identification name/version manually
| * Allow setting client identification name/version manuallyJohn Hernandez2023-04-092-53/+73
| | | | | | | | | | | | | | | | Add changes allowing user to switch client name and version. Useful for enhancing user privacy. Minor cleanup.
* | User proper ellipsis charMartin Dosch2023-04-093-3/+3
|/ | | | | | | As stated in https://github.com/profanity-im/profanity/pull/1820#issuecomment-1498083383 profanity uses "..." (three dots) in a lot of places instead the proper ellipsis char "…".
* Fix typos and update codespell configurationDaniel Santos2023-04-031-1/+1
| | | | | | | | | | * Fix typos. * Add words that are not typos to codespell's ignore words list and ignore regex. * Make codespell ignore URIs. * Make `make doublecheck` throw no error. Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* Fix OTRJohn Hernandez2023-03-311-4/+0
| | | | Fix OTR: carbon in stanza breaks OTR and prevents it from starting and working properly.
* Adapt to g_string_free glib 2.75.3 changeMichael Vetter2023-03-214-24/+10
| | | | | | | | | | | | glib 2.75.3 changes warning behaviour of `g_string_free()`. See: * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3219 * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3226 Use this opportunity to replace the use of GString with `g_strdup_printf()` where possible. Otherwise correctly take the return value of `g_string_free()` which is nicer anyways.
* simplify some codeSteffen Jaeckel2023-03-111-5/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* remove compat codeSteffen Jaeckel2023-03-111-15/+0
| | | | | | We already depend on libstrophe >= 0.12, so this code can go. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Fix MAM not loading some recent messagesMarcoPolo-PasTonMolo2023-02-141-4/+4
| | | | | Reverse a small change from commit e886ba0 that caused this issue. Fixes https://github.com/profanity-im/profanity/issues/1790
* Merge pull request #1788 from profanity-im/minor-improvementsMichael Vetter2023-01-302-9/+13
|\ | | | | Minor improvements
| * prevent setting invalid combination of libstrophe flagsSteffen Jaeckel2023-01-271-2/+10
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * simplify some codeSteffen Jaeckel2023-01-261-4/+2
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * fix libstrophe timer-callback usageSteffen Jaeckel2023-01-261-3/+1
| | | | | | | | | | | | | | The timer will be auto-removed if the callback returns `0`. The way it was done before breaks some internals of libstrophe. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Add macro for possible NULL prints and use it on known sportsthe xhr2023-01-262-3/+3
| | | | | | | | | | The macro is effective on OpenBSD and basically a no op on other platforms. Use it for one existing and the other known debug statements.
* | Check if string is NULL and print placeholder insteadthe xhr2023-01-261-1/+1
|/ | | | OpenBSD's kernel warns about NULL printfs. Fix this with a standard check.
* introduce `auto_jid` and refcounting in `Jid`Steffen Jaeckel2023-01-193-26/+36
| | | | | | | | This also fixes a memory leak from within `_handle_groupchat()` in [0]. [0] src/xmpp/message.c Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* improve const correctnessSteffen Jaeckel2023-01-183-8/+8
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* fix more memory leaksSteffen Jaeckel2023-01-182-11/+16
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `now` option to `/reconnect` commandSteffen Jaeckel2023-01-182-6/+5
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `/strophe` command to modify libstrophe-specific settingsSteffen Jaeckel2023-01-181-7/+17
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-106-6/+6
|
* Apply codigng style on new MAM codeMichael Vetter2022-10-212-6/+6
|
* Fix GSList handling in new MAM codePaul Fertser2022-10-211-13/+8
| | | | | This patch was provided by @paulfertser and applied by @jubalh. Thanks a lot Paul!
* Fix merge mistakeMichael Vetter2022-10-211-1/+1
|
* Merge MAM improvements from #1724Michael Vetter2022-10-214-45/+263
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Handle late deliveryMarcoPolo-PasTonMolo2022-08-202-20/+103
| |
| * Handle scrolling down when buffer fills upMarcoPolo-PasTonMolo2022-07-101-3/+3
| |
| * CleanupMarcoPolo-PasTonMolo2022-07-051-1/+0
| |
| * Add loading history message on initial MAM requestMarcoPolo-PasTonMolo2022-07-051-0/+5
| | | | | | | | | | | | This prevents scrolling to top and initiating another MAM request while still fetching the initial one. Also free timestamp object in database.c
| * Fix initial MAM not displayingMarcoPolo-PasTonMolo2022-07-053-36/+42
| | | | | | | | | | | | 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.
| * Add 'Loading messages' message when scrolling upMarcoPolo-PasTonMolo2022-07-041-0/+2
| |