1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00
Commit Graph

5132 Commits

Author SHA1 Message Date
Michael Vetter
aa9ba63f5f
Merge pull request #1760 from techmetx11/fix/1759-async
Replace `call_external`'s implementation with an async one
2022-10-12 12:45:07 +02:00
Marouane L
2d11a35ee1 Spawn external programs asynchronously
Drawback is that we can't check the exitcode anymore.
But we were unsure why/when we need this, see:
https://github.com/profanity-im/profanity/pull/1760/files#r980868708

Fixes https://github.com/profanity-im/profanity/issues/1759
2022-10-12 12:25:00 +02:00
Michael Vetter
a86e86cce0 Fix first start detection
Only display help message on first start.
This is a fixup for:
27a5c9d287
2022-10-11 16:39:55 +02:00
Michael Vetter
4b2bbe59ea Format Maxis commit properly 2022-09-29 11:11:01 +02:00
Maxi Wuttke
021927a549 Use G_GSIZE_FORMAT instead of "%lu" for portability
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.
2022-09-29 10:46:32 +02:00
Michael Vetter
7ffe55e980
Merge pull request #1756 from sgn/python-3.11
plugin: python: fix build for Python 3.11
2022-09-25 22:34:25 +02:00
Đoàn Trần Công Danh
5a72fefe89 plugin: python: fix build for Python 3.11
From Python 3.11, PyFrameObject has been changed into opaque struct.
We need to access those fields via API.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2022-09-24 12:49:12 +07:00
Viachaslau Khalikin
0cb46460b3
fix: print when no plugins installed
Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-20 04:30:11 +03:00
Viachaslau Khalikin
d75e5c1c28
add: autocompletion plugins arguments
support for "update" and "uninstall"

Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-20 04:00:44 +03:00
Viachaslau Khalikin
0ceb8c53c3
fix: filtering of the available global plugins
For command /plugins :
Don't print files that do not correspond to the plugins design

Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-20 01:46:51 +03:00
Viachaslau Khalikin
cc7231a43b
minor: using cons_bad_cmd_usage() instead of the manual handling
Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-19 18:08:54 +03:00
Viachaslau Khalikin
6cb6823aed
Fix typo which catched by codespell 2022-09-19 00:45:29 +03:00
Viachaslau Khalikin
45fa60e7e2
Print unloaded plugins which already installed
Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-19 00:29:24 +03:00
Viachaslau Khalikin
dd1a9a1e50
Fix handle cmd_plugins_uninstall without args
Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
2022-09-19 00:12:49 +03:00
Steffen Jaeckel
25e56fb494 less strdup()+free()
Improvement of f8ff93234e

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-09-07 12:42:15 +02:00
Steffen Jaeckel
095d40d3bd tell the user to which file we're logging
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-09-07 10:04:00 +02:00
Steffen Jaeckel
099b443dc8 Tell user where the downloaded file is stored
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-09-07 10:04:00 +02:00
nandesu-utils
e1ed012f72 support for formatting in avatar executable
in before it just used the input command line as it was but this fixes
this by adding formatting using `format_call_external_argv` which is
already used in `url open` executable.
2022-09-06 12:51:27 +02:00
nandesu-utils
056b19eb91 refactored call_external code
unluckily here the code neglected the fact that glib will set an error
to a location that was pointed by the error pointer if it is not null.
but it was of an undefined value hence profanity crashed. now it is null
as it must be.

also spawn error is returned when glib could not spawn the task for
some reason like the executable file does not exist but if the exit
status was non-zero it neglected the exit error and tried to output a
spawn error instead. now we check whether the process that we
instantiated has exited successfully

also now code uses `g_spawn_check_wait_status` which
`g_spawn_check_exit_status` has been aliased to.
2022-08-27 16:25:15 +03:00
Steffen Jaeckel
65acffcf07 fixup 11f52ad547
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-08-08 17:15:58 +02:00
Steffen Jaeckel
11f52ad547 integrate XEP-0198 Stream-Management
* save SM state and send-queue entries on disconnect
* restore SM state and send-queue entries on reconnect

fixes #698

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-08-08 13:39:58 +02:00
Michael Vetter
932e7826aa common: dont use GError twice
We need to use a new one or call `g_clear_error()`.

Fix segfault in https://github.com/profanity-im/profanity/issues/1738
2022-08-02 14:13:28 +02:00
Michael Vetter
9df4bd29ea Check for error before trying to append it
Related to https://github.com/profanity-im/profanity/issues/1738
2022-08-02 08:55:18 +02:00
Netboy3
4ea98c71ee Fix /autoaway command logic
Two issues were fixed in the parser logic:
* A call to cons_bad_cmd_usage() was placed at the end of the "time"
  parser section that blocked reachability to both "message" and
  "check" parser sections. This caused "/autoaway message ..." and
  "/autoaway check ..." to always fail with "Invalid usage". This
  issue was introduced in commit 3c1e4ba.
* "/autoaway message xa" with no message argument returns message
  set to (null). This should be fixed the same way as
  "/autoaway message away" was fixed in commit 3c1e4ba.
2022-07-28 11:48:38 -04:00
Michael Vetter
27a5c9d287 Display a help message upon first start of Profanity
Explaining how to register/connect/set up an account.
2022-07-05 06:57:11 +02:00
Michael Vetter
c8b2979dcd Exit *_incoming_msg functions when plain message is empty
Fix https://github.com/profanity-im/profanity/issues/1733
2022-07-04 16:58:16 +02:00
Michael Vetter
f30999fd51 ox: handle empty message->plain
In case we dont have plain but have body, copy this (like in
_sv_ev_incoming_pgp).
In case we have neither, return.
2022-07-04 16:40:44 +02:00
Michael Vetter
9ef3491228 Let slashguard ignore quoted messages
This let's us whole `/me` messages and other messages starting with `>`.

Fix https://github.com/profanity-im/profanity/issues/1732
2022-07-04 09:15:03 +02:00
Michael Vetter
4818b02391
Merge pull request #1731 from profanity-im/retrieve-enc-type-from-db
Retrieve enc type from db
2022-06-29 15:58:24 +02:00
Michael Vetter
3d17ecc62b database: remove comment 2022-06-29 15:31:37 +02:00
Michael Vetter
6375b2719f database: retrieve encryption type
When we get a message from the database, also retrieve the encryption
type.
2022-06-29 15:30:54 +02:00
Michael Vetter
c84b1b5e5d Don't scroll if not needed
If we are in a window with a lot of text and press PAGE UP we scroll up
and write [scrolled] in the titlebar.

So far we also wrote [scrolled] in there even when actually nothing
happened. Like when opening a new window (/msg someone) and there is no
text inside.
2022-06-29 13:50:04 +02:00
Michael Vetter
449c7ce2ba ox: add helper message in case signcrypt doesnt work
Most likely they didnt trust/sign the key. Which is described in the
profanity-ox-setup man page.
2022-06-29 13:26:15 +02:00
Michael Vetter
b3b76d9f5c stanza: remove strange assignment 2022-06-29 12:31:06 +02:00
Michael Vetter
14a2fb6e72 accounts: deduplicate code via helper function 2022-06-29 12:30:05 +02:00
Michael Vetter
945ac79364 scripts: get rid of read variable 2022-06-29 10:34:59 +02:00
Michael Vetter
30faa6c367 chatlog: remove unused variable 2022-06-29 09:44:57 +02:00
Michael Vetter
dfc51f7ba4 database: unref date 2022-06-29 09:42:54 +02:00
Michael Vetter
ca9cc3275a Remove comment 2022-06-29 09:21:44 +02:00
Michael Vetter
4d215fc33e Move ox_gpg_public_keys description 2022-06-29 09:20:27 +02:00
Michael Vetter
a40a0f5189 Split ox functions from gpg.c to ox.c 2022-06-29 09:17:15 +02:00
Michael Vetter
974f21efdc chatlog: sort and rename some functions 2022-06-28 20:49:22 +02:00
Michael Vetter
9312333ba2 log: put static functions on top 2022-06-28 20:13:55 +02:00
Michael Vetter
38ea55431d Include xmpp.h to cafile.c
Was pulled in through log.h
2022-06-28 20:08:44 +02:00
Michael Vetter
9eec0ce26e Include common.h and xmpp.h in editor.c
That was pulled in through log.h
2022-06-28 20:08:44 +02:00
Michael Vetter
99e93f6b8b Include xmpp.h in bookmark_ignore.c
That was pulled in through log.h
2022-06-28 20:08:44 +02:00
Michael Vetter
31e6b7564e Include xmpp and message header to database.c
That was pulled in through log.h.
2022-06-28 20:08:44 +02:00
Michael Vetter
585f68f4f7 Split log.c into log.c and chatlog.c 2022-06-28 20:08:38 +02:00
Michael Vetter
c0e27f5e72 Fix formatting 2022-06-22 13:10:42 +02:00
Michael Vetter
4da322db3b Add autocompletion for /log level 2022-06-22 13:05:11 +02:00