1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

7415 Commits

Author SHA1 Message Date
Steffen Jaeckel
e668c4f7df Extend autoping timer on each stanza we receive.
Sometimes the server is too busy sending other stanzas or our connection is
saturated because of something else, so the pong arrives too late.
Prevent the autoping disconnect event by extending the timeout
each time a stanza is received.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-10-04 17:02:10 +02:00
Michael Vetter
0de0594c5a
Merge pull request #1887 from profanity-im/fix-omemo-keyfile-loading
Fix OMEMO keyfile loading
2023-09-11 12:28:14 +02:00
Steffen Jaeckel
5b6b5130ae Fix OMEMO keyfile loading
We have to lazy load the keyfiles as they will maybe be written at one
point and should be initialized by that time.

Fixup of ca2df180d8

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-08 14:51:13 +02:00
Michael Vetter
394c935469
Merge pull request #1883 from profanity-im/fix/1877-url
Cut URLs before adding to automcomp at `>`
2023-09-05 10:44:00 +02:00
Michael Vetter
59f25cba4f
Merge pull request #1886 from profanity-im/unify-keyfile-loading
Unify keyfile loading
2023-09-05 10:43:24 +02:00
Michael Vetter
9f08cd44a6 Adjust regex to match URLs
First I tried with g_uri_parse() and g_uri_to_string() but then I
learned that GUri validation API is only for things that are part of a
proper URL.

Then used `g_utf8_strchr()` to cut the string at `>` since they are
sometimes enclosed in `<>`.

Thanks to @sjaeckel for providing a proper regex from
https://stackoverflow.com/questions/43588699/regex-for-matching-any-url-character

Fix https://github.com/profanity-im/profanity/issues/1877
2023-09-05 10:24:45 +02:00
Steffen Jaeckel
ca2df180d8 Introduce a shared implementation for keyfile loading
Instead of copy&pasting the same code over again, use a common
implementation.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-04 09:59:09 +02:00
Steffen Jaeckel
b7f964fe64 Resolve symlinks recursively in get_file_or_linked()
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-04 09:59:09 +02:00
Michael Vetter
d75b263b39
Merge pull request #1884 from profanity-im/refactor-some-stuff
Refactor some internals
2023-09-04 09:34:54 +02:00
Steffen Jaeckel
d3b6ebb1d7 Less allocations in str_replace()
If `n` is the number of `substr` replace operations, the old
implementation did `n+1` allocations and always first copied start,
then replacement, then the remaining (unsearched) part of the original
string.

Now calculate the number of occurences of `substr` before allocating the
resulting string.
Change the algorithm to parse through the original string and only
copy the parts that must be kept into the resulting string plus the
replacements where they belong at.
Now we also only have to go through the original string twice plus we only
do a single allocation.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-01 12:12:44 +02:00
Steffen Jaeckel
b36562c6b6 Introduce win_println_va()
Previously we printed a format string into a `GString` to then print that
result again into a `GString` and display that.
This patch removes one level of `GString` printing by forwarding the
`va_arg` to the newly added API `win_println_va()`.

Introducing `static win_println_va_internal()` also allowed refactoring
most of the `win_print*()` and `win_append*()` implementations and removing
all the redundant code.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-01 12:12:44 +02:00
Michael Vetter
84cd28c5be
Merge pull request #1885 from profanity-im/fix-some-stuff
Fix some stuff
2023-09-01 12:01:41 +02:00
Steffen Jaeckel
e8348b8d17 Update preferences.h
* fix const correctness of `prefs_load()`
* remove some API's that don't exist anymore

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-08-31 23:14:02 +02:00
Steffen Jaeckel
1bb1f57128 No need to double check the window type
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-08-31 23:14:02 +02:00
Steffen Jaeckel
5657aac33d Fix some more char* -> gchar*.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-08-31 23:14:02 +02:00
Michael Vetter
8618203988
Merge pull request #1882 from profanity-im/fix/1880-pluginsinstall
Don't crash when using `/plugins install` disconnected
2023-08-28 10:00:54 +02:00
Michael Vetter
b88174709f Don't crash when using /plugins install disconnected
When we are not connected and run `/plugins install` we crash because we
get the account struct to check for the (xmpp) tls setting.
To apply that to the http (etc) connection to download the plugin from a
server.

This got introduced in 3a86b8c29 to fix #1624.

There are several ways to handle this (some described in 1880) in this
patch I took the route that it will use secure connection when we are
nto connected and will only check the tls.trust account setting if we
are connected.

Fix https://github.com/profanity-im/profanity/issues/1880
2023-08-28 07:55:29 +02:00
Michael Vetter
65d62dbf49 readme: format btc 2023-08-25 20:11:26 +02:00
Michael Vetter
a6deed2f1e
Merge pull request #1879 from profanity-im/enablemacos
ci: reenable macos
2023-08-25 19:52:10 +02:00
Michael Vetter
35c3068a2d ci: reenable macos
This reverts commit a815e251b6.
2023-08-25 19:36:29 +02:00
Michael Vetter
568266ec6b
Merge pull request #1878 from profanity-im/fix/oxcarbon
ox: correctly recognize ox encrypted carbons
2023-08-25 08:36:36 +02:00
Michael Vetter
122434a276 ox: correctly recognize ox encrypted carbons
and dont display them as legacy pgp encrypted messages.
This was forgotten in 2c94ee5a8.

Fix https://github.com/profanity-im/profanity/issues/1875
2023-08-25 08:24:53 +02:00
Michael Vetter
02c33474fa doap: add xep0373 2023-08-23 10:49:57 +02:00
Michael Vetter
d286e4674c readme: add btc 2023-08-20 21:03:05 +02:00
Michael Vetter
2916b6e716 Add xep-0049 to doap
Found by @H3rnand3zzz.
2023-08-11 16:04:27 +02:00
Michael Vetter
492efc432c Display headline sender 2023-08-11 15:56:26 +02:00
Michael Vetter
a17544d962 Remove not needed check 2023-08-11 15:34:26 +02:00
Michael Vetter
f56ce07141
Merge pull request #1876 from mdosch/fix-screensaver-spam
Don't use xscreensaver on wayland.
2023-08-11 13:25:06 +02:00
Martin Dosch
2ed6211cc3 Don't use xscreensaver on wayland.
Fixes #1874.
2023-08-11 13:12:52 +02:00
Michael Vetter
191f571bcd Fix spaces in /privacy description 2023-08-04 08:39:20 +02:00
Michael Vetter
fc65607f45 Add 0.14.0 release to doap and fix links 2023-08-04 08:37:54 +02:00
Michael Vetter
fd2b977d6a Fix my email 2023-08-04 08:35:27 +02:00
Michael Vetter
a815e251b6 ci: disable macos until they have libstrophe 0.12.3 in brew 2023-08-03 08:45:41 +02:00
Michael Vetter
2cf1269b68 Typo fixes 2023-08-03 08:26:23 +02:00
Michael Vetter
b223b7ebac Start new cycle 2023-08-03 08:06:19 +02:00
Michael Vetter
6b0fddd925 Release 0.14.0 2023-08-03 08:01:43 +02:00
Michael Vetter
e83ed9205d Update doap file DEV -> 0.14.0 2023-08-03 07:59:10 +02:00
Michael Vetter
acc2ec8fd7 Add 0.14.0 changelog 2023-08-03 07:56:33 +02:00
Michael Vetter
3f034c46cd Depend on libstrophe 0.12.3
Among other things for:
* https://github.com/profanity-im/profanity/issues/915
* https://github.com/profanity-im/profanity/issues/1849
2023-08-02 16:34:34 +02:00
Michael Vetter
e853c121d9 Fix my email address
in all files
2023-07-31 16:51:58 +02:00
Michael Vetter
215e35b198 Fix my email address 2023-07-31 16:42:45 +02:00
Michael Vetter
3a9de7d21b fix: use correct format specifier in /privacy
Thanks to @H3rnand3zzz for noticing.
2023-07-27 15:13:44 +02:00
Michael Vetter
fa80562fa8
Merge pull request #1870 from profanity-im/feat/privacy-setting
Move related commands as subcommands into /privacy
2023-07-27 10:27:24 +02:00
Michael Vetter
5fb3453808 Print actual client id in /privacy overview
Instead of just saying that we sent the "default".
2023-07-26 20:43:50 +02:00
Michael Vetter
22b1d14b67 Add helper function to create version string
And remove all the duplicate code.

Depending on the situation prof_get_version() will return:
* 0.13.1
* 0.13.1dev
* 0.13.1dev.master.69d8c1f9
2023-07-25 20:58:15 +02:00
Michael Vetter
13af6c96dc Link from /privacy to relevant /account settings
Related to https://github.com/profanity-im/profanity/issues/1836
2023-07-25 20:14:29 +02:00
Michael Vetter
f7cce4c5c1 Move /os into /privacy os
Related to https://github.com/profanity-im/profanity/issues/1836
2023-07-25 16:35:14 +02:00
Michael Vetter
feba4b8263 Add cons_privacy_setting() to print privacy setting infos 2023-07-24 18:25:34 +02:00
Michael Vetter
69d8c1f96e
Merge pull request #1869 from profanity-im/fix/1868-mam
Fix crash if we don't get `first` stanza during RSM
2023-07-18 16:45:40 +02:00
Michael Vetter
a963ff4d24 mam: check if we get 'first' stanza before usage
Fix https://github.com/profanity-im/profanity/issues/1868
2023-07-18 16:44:44 +02:00