Fixes https://github.com/profanity-im/profanity/issues/1794
Explanation
The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID.
Solution
Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
After adding MAM quote and url autocompletion wouldn't pick up messages
from MAM or history(from DB) or would have them in the wrong order. This
commit fixes that.
Fixes https://github.com/profanity-im/profanity/issues/1770
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>
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>
In 28a9605a1 we migrated from AC_CHECK_LIB which defines HAVE_LIBXSS automatically. With pkg-config way you need it explicit. And also x11 is needed or else linking will fail missing XFree().
Patch provided by Paul Fertser and comitted by jubalh.
Thanks Paul!
Fix https://github.com/profanity-im/profanity/issues/1695
Previously after the url if you pressed tab, even if you typed out a
filepath, profanity would erase that and cycle through url autocomplete
results.
This patch solves that and autocompletes filepaths after the url.
Fixes https://github.com/profanity-im/profanity/issues/1783
Locally I have clang-format 15.0.2.
Our CI runs ubuntu-20.04 so it has 10.0.
Seems like a default value changed but I can't find it.
When I still had clang-format 14.x everything was fine and checking:
https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
I only see irrelevant things.
Someone on the llvm IRC channel sais "there is no guarantee" and "maybe
a regression or intended change".
But seems like noone knows which setting could be the one we need.
Since I don't have a better solution for now I will just edit this by
hand to apply to the clang-format version we have on the CI.
Will look into updating this one.
But in any case it would be best if the configuration file could have
this setting so formatting works the same for all contributors.
When loading messages from MAM profanity would segfault. Reason was that
we were freeing the timestamp of messages when displaying them and we
needed it for loading MAM.
We removed this so that we don't get "[SCROLLED]" in the titlebar when
there is actually not more text available.
But now with MAM we can enable this again so that the user can scroll up
and load more text out of the database.
Maybe this also could use a check.
This reverts commit c84b1b5e5d.