1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
Commit Graph

7128 Commits

Author SHA1 Message Date
Juraj Mlich
c5b370bffc database.c: fix inserting messages to chat logs if archive_id is empty
The original intention of the code was that in case archive_id is not set, NULL should be inserted. What is
inserted however is an empty string. This causes the condition to not insert messages with non-unique
archive_id insert only one message in total and ignore all further ones (if NULL was there, the condition
would work properly). And this in turn causes chat history not work properly.

This commit makes the SQL condition work properly and therefore fixes chat history.

Fixes #1589.
2021-12-31 17:45:45 +01:00
Michael Vetter
a1e0f1d414
Merge pull request #1623 from wstrm/openbsd-build
Upgrade to OpenBSD 7.0 in CI
2021-12-25 10:16:35 +01:00
William Wennerström
5e750e1fbc
Upgrade to OpenBSD 7.0 in CI 2021-12-24 13:49:07 +01:00
Michael Vetter
ed79b074c6
Merge pull request #1622 from a02c1175-5220-4e75-b7a1-18e20548305f/master
use wildcard for man pages in Makefile.am
2021-12-22 12:59:06 +01:00
a02c1175-5220-4e75-b7a1-18e20548305f
46b9428d92
use wildcard for man pages in Makefile.am 2021-12-22 07:44:27 +00:00
Michael Vetter
d4c9a98d71 omemo: log when no pubsub
Closes https://github.com/profanity-im/profanity/issues/1621
2021-12-13 17:11:30 +01:00
Michael Vetter
818e93219e
Merge pull request #1605 from DebXWoody/xep/xep0107-user-mood
xep-0107: User Mood
2021-12-06 14:06:12 +01:00
Michael Vetter
b67054aa39
Merge branch 'master' into xep/xep0107-user-mood 2021-12-06 13:49:04 +01:00
Michael Vetter
6c3e6a5262 xep-0107: adapting the pubsub/headline code
Like mentioned on the review at
https://github.com/profanity-im/profanity/pull/1605 I don't ge why
@DebXWoody changed the code like he did.

I changed it to something that made more sense to me now.
Instead of looking for headline in two places and checking for pubsub in
a headline place (only).

I didn't check this deeply. And still have a feeling that this is not
the best way to go. But I didn't read the XEP yet.

Added a TODO to the code regarding this too.

A quick skimming through https://xmpp.org/extensions/xep-0107.html
doesn't show me anything regarding headline. So I really don't see why
this needs to go here.

Hopefully @DebXWoody checks this in the future. But since he didn't
react on the PR I decided to make some adjustments myself so we can
merge it.
2021-12-06 13:44:04 +01:00
Michael Vetter
67fea6f3c4 xep-0107: adjust help 2021-12-06 13:38:46 +01:00
DebXWoody
2f3de0eb0d xep-0107: code review
* Remarks in the Merge Request (ac_reset, help)
* Defines in iq.c
* Mood help and null check
* Added additional information about tab key in CMD_DESC.
* Added additional null check
2021-12-06 13:33:21 +01:00
Michael Vetter
e745b4af60 tests: add publish_user_mood stub 2021-12-06 13:33:21 +01:00
DebXWoody
23e886ed5e Add xep-0107: User Mood support
Implementation of XEP 0107 - User Mood
2021-12-06 13:32:54 +01:00
Michael Vetter
5355c9b856
Merge pull request #1620 from profanity-im/readd-ci
Re-Enable CI for TW, ubuntu and macos.

For Arch I get:
```
Step 1/24 : FROM archlinux/latest
pull access denied for archlinux/latest, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
```

for both archlinux/latest and archlinux/base.

Let's leave it out :-)
2021-12-03 17:06:14 +01:00
Michael Vetter
05435d2714 ci: re-enable tumblweed
Old docker/libseccomp from GH got updated.

This reverts commit 5c5c453219.
2021-12-03 16:50:00 +01:00
Michael Vetter
8b53acd608 ci: update ubuntu python package names 2021-12-03 16:15:04 +01:00
Michael Vetter
d6633e0920 ci: re-enable ubuntu
This reverts commit cc206ee8cc.
2021-12-03 16:14:26 +01:00
Michael Vetter
a980ab14a0 ci: re-enable macos
They have libstrophe 0.11.0 now.
This reverts commit 472a3ceec4.
2021-12-03 15:56:56 +01:00
Michael Vetter
7a8f0e4873
Merge pull request #1610 from nandesu-utils/master
Fix message encryption for sender devices
2021-11-30 15:31:51 +01:00
Michael Vetter
9efceb8240
Merge pull request #1616 from trofi/master
gcc-12 fixes
2021-11-26 16:43:32 +01:00
Sergei Trofimovich
f0a39a4b66 python_api.c: enlarge c_arguments array to avoid OOB write
Code below explicitly refers past `args_len`th element:

        c_arguments[args_len][0] = NULL;
        c_arguments[args_len][1] = NULL;

Let's always allocate space for `NULL`. Noticed by Steffen Jaeckel.
2021-11-26 07:54:01 +00:00
Michael Vetter
064ee6b1e1
Merge pull request #1618 from profanity-im/fix/1614-otr
Fix carbons criteria
2021-11-25 18:51:46 +01:00
Michael Vetter
2f7317cc18 Fix carbons criteria
We came into the carbons checking code when we received `<private
xmlns="urn:xmpp:carbons:2"/>`. Which actually marks a message to _not_
be a carbon.

In this code we also make sure that carbons only come from us.
If not we don't call the message handler code.

So we should actually only check for `<sent xmlns='urn:xmpp:carbons:2'>`
and `<received xmlns='urn:xmpp:carbons:2'>`.

Thanks pukkamustard and Holger.

Fixes https://github.com/profanity-im/profanity/issues/1614
2021-11-25 15:33:49 +01:00
Michael Vetter
6d2f929950
Merge pull request #1617 from carlocab/osx-configure
Make readline check more portable
2021-11-24 00:36:09 +01:00
Carlo Cabrera
1194a9b85e
Improve macOS Readline checks
Instead of checking for `lib` directories, let's make sure `libreadline`
exists.

Also, let's improve the error message if we can't find it. Finally,
since we're only looking for `brew` on macOS, we don't need to use
`$PATH_SEPARATOR` since we know what the path separator is.
2021-11-24 00:10:05 +08:00
Carlo Cabrera
315d862e22
Make readline check more portable
Currently, `configure.ac` assumes Readline is installed via Homebrew in
`/usr/local`. This doesn't work for Homebrew on Apple Silicon, or
MacPorts.

Let's fix this by checking for a `brew` installation, and querying that
for Readline's prefix if available. If not, it checks for an existing
MacPorts prefix, and finally falls back to checking `/usr/local` in case
a user installed Readline for themselves there.
2021-11-23 21:57:02 +08:00
Sergei Trofimovich
a77a57a6a4 src/plugins/python_api.c: drop redundant NULL pointer check
gcc-12 detects redundant check against array of arrays as:

    src/plugins/python_api.c: In function ‘python_api_register_command’:
    src/plugins/python_api.c:199:31: error: the comparison will always evaluate as ‘true’ for the address of ‘c_arguments’ will never be NULL [-Werror=address]
      199 |         while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) {
          |                               ^~
    src/plugins/python_api.c:161:15: note: ‘c_arguments’ declared here
      161 |         char* c_arguments[args_len == 0 ? 0 : args_len + 1][2];
          |               ^~~~~~~~~~~
2021-11-18 22:29:11 +00:00
Sergei Trofimovich
753d9dbbdb src/plugins/callbacks.c: drop redundant NULL pointer check
gcc-12 detects redundant check against array of arrays as:

    src/plugins/callbacks.c: In function ‘_free_command_help’:
    src/plugins/callbacks.c:85:26: error: the comparison will always evaluate as ‘true’ for the address of ‘args’ will never be NULL [-Werror=address]
       85 |     while (help->args[i] != NULL && help->args[i][0] != NULL) {
          |                          ^~
    In file included from ./src/ui/ui.h:44,
                     from ./src/command/cmd_defs.h:42,
                     from src/plugins/callbacks.c:41:
    ./src/command/cmd_funcs.h:48:12: note: ‘args’ declared here
       48 |     gchar* args[128][2];
          |            ^~~~
2021-11-18 22:27:20 +00:00
Michael Vetter
9a9122c148 Cleanup _get_message_from_editor a bit
* Fix `src/command/cmd_funcs.c:9463:9: error: ignoring return value of
  ‘write’ declared with attribute ‘warn_unused_result’
  [-Werror=unused-result]`
* Free memory earlier and on less places
* Check for succesful open() and write()
2021-11-01 12:24:28 +01:00
Michael Vetter
7f5f334cd7
Merge pull request #1611 from nlfx/fix-omemo-sendfile
Fix OMEMO /sendfile on non-glibc systems
2021-11-01 12:11:49 +01:00
nlfx
c41749b124
Fix OMEMO /sendfile on non-glibc systems 2021-11-01 03:59:44 +01:00
Michael Vetter
cad934b9a0
Merge pull request #1608 from sjaeckel/deprecate-libmesode
Deprecate libmesode
2021-10-28 20:30:38 +02:00
Michael Vetter
472a3ceec4 ci: disable osx until they updated libstrophe 2021-10-28 20:15:40 +02:00
Michael Vetter
61cebcdf5b ci: switch from libmesode to libstrophe 2021-10-28 20:13:41 +02:00
Michael Vetter
16ce42a0db bump libstrophe requirement to 0.11.0 2021-10-28 20:07:13 +02:00
nandesu-utils
fee23b55f0
Refined sender device acquirement
Now the sender devices are acknowledged only after omemo is loaded. That
is, after key generation has been completed or identity has been loaded.
2021-10-29 01:27:38 +09:00
Steffen Jaeckel
d2ba0e0833 auto-format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2021-10-27 22:45:44 +02:00
Steffen Jaeckel
7f646e3668 use new libstrophe API
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2021-10-27 22:45:44 +02:00
Steffen Jaeckel
687714d7d6 ran autoupdate
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2021-10-27 22:45:44 +02:00
Steffen Jaeckel
ffc0b49ab1 first step to remove libmesode
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2021-10-27 22:45:44 +02:00
nandesu-utils
17d62921e9
Acquire sender's device list on connection
After generation of an identity we observe that `omemo_ctx.device_list`
has an entry for sender's jid. But on application restart it is absent
thus messages are not encrypted for the rest set of sender devices.

This commit fixes this by applying code for acquiring the aforementioned device list after the connection.
2021-10-28 04:23:41 +09:00
Michael Vetter
b4d65335f6 Remove spec file
Debian build files were removed in
2e4af77b85.

I think it's good enough if distros ship their build scripts.
No reason to maintain them upstream.

People who are interested can take a look at the openSUSE spec file:
https://build.opensuse.org/package/view_file/network/profanity/profanity.spec
2021-10-23 22:43:52 +02:00
Michael Vetter
baf51b9580 readme: remove chat badge
Service doesn't work since a couple of weeks.
Let's readd it once they fixed it.
2021-10-22 17:12:06 +02:00
Michael Vetter
56846a5b77
Merge pull request #1607 from profanity-im/utf8indicatorchar
Allow more UI indicator signs to be utf8 "characters"
2021-10-22 17:08:14 +02:00
Michael Vetter
cc206ee8cc ci: remove ubuntu
Fails and I don't have time to check why.
Something package related most likely.
2021-10-22 16:57:24 +02:00
Michael Vetter
a9bcc8e8bd Allow utf8 in occupants header char 2021-10-22 16:54:05 +02:00
Michael Vetter
1c96115f97 Allow utf8 in occupants char 2021-10-22 16:54:05 +02:00
Michael Vetter
fa2881fcea Allow utf8 in roster room private char 2021-10-22 16:54:05 +02:00
Michael Vetter
8fc359ba2d Allow utf8 in roster rooms char 2021-10-22 16:54:05 +02:00
Michael Vetter
7faf15a18c Allow utf8 in roster private char 2021-10-22 16:54:05 +02:00