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
MarcoPolo-PasTonMolo
72f613a014
Handle MAM when chatwin gets created from incoming message
2022-07-10 12:28:14 +03:00
MarcoPolo-PasTonMolo
a2f79a19b9
Fix duplicate sent messages in db
2022-07-10 11:17:35 +03:00
MarcoPolo-PasTonMolo
85aaf40432
Have ability to scroll through history even without MAM
2022-07-10 11:17:35 +03:00
MarcoPolo-PasTonMolo
47b3e528e2
Handle scrolling down when buffer fills up
2022-07-10 11:17:35 +03:00
MarcoPolo-PasTonMolo
b03c3bda98
Cleanup
2022-07-05 11:30:04 +03:00
MarcoPolo-PasTonMolo
4d6e95d691
Add loading history message on initial MAM request
...
This prevents scrolling to top and initiating another MAM request while
still fetching the initial one.
Also free timestamp object in database.c
2022-07-05 11:12:29 +03: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
MarcoPolo-PasTonMolo
6429698f18
Fix initial MAM not displaying
...
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.
2022-07-05 00:06:04 +03: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
MarcoPolo-PasTonMolo
e9da694265
Add 'Loading messages' message when scrolling up
2022-07-04 12:39:59 +03: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
MarcoPolo-PasTonMolo
97a610e915
Fech data from mam when all history gets displayed
...
Fetch from mam without displaying when all mam messages get received
display new messages from db.
Unstable, initial mam doesn't get displayed unless we start scrolling.
2022-07-03 21:30:02 +03:00
MarcoPolo-PasTonMolo
ea83165a35
Get messages from history when scrolling up.
2022-07-03 21:29:36 +03:00
MarcoPolo-PasTonMolo
f0202a2fe0
On new chatwin fetch mam according to guidelines.
...
Taken from here:
cd3e871e55
2022-07-03 21:23:07 +03: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
Michael Vetter
b302c604ab
Display log level information in preferences
2022-06-22 13:05:11 +02:00
Michael Vetter
ff8065eaca
Rename _log_string_from_level to _log_abbreviation_string_from_level
2022-06-22 13:05:11 +02:00
Michael Vetter
5c0c386ffa
Correct default log maxsize in help
...
This was changed in c4d7f1c29 from 1MB to 10MB.
2022-06-22 13:05:02 +02:00
Michael Vetter
3f26dd6be9
Let user change log level while running
...
`/log level INFO|DEBUG|WARN|ERROR` is now available.
Looks like this solves a TODO (see removed comment in source) from 2013
:-)
Works only with default log file. Not with user provided log file during
start up via the -f parameter.
Fix https://github.com/profanity-im/profanity/issues/1627
2022-06-22 12:39:44 +02:00
Michael Vetter
918d060817
Display mood preferences
2022-06-22 11:45:13 +02:00
Michael Vetter
9f13b9e939
Make mood display optional
2022-06-22 11:32:27 +02:00
MarcoPolo-PasTonMolo
f1d1a80d07
Fix build without omemo
2022-06-17 15:51:45 +03:00
MarcoPolo-PasTonMolo
e4e53d6e01
Don't forget encryption status for OX and PGP.
...
Use a pgp.enabled and ox.enabled array the same way that omemo.enabled
is used.
Fixes https://github.com/profanity-im/profanity/issues/1694
Fixes https://github.com/profanity-im/profanity/issues/733
2022-06-17 15:43:54 +03:00
MarcoPolo-PasTonMolo
13f1b831df
Improve cmd argument parser
...
"" used to become " now it just becomes an empty argument.
Also if quotes appeared after a token started then if the number of
quotes in the token is n the resulting one would be a token with the
n last characters cut off, now it's fixed.
Fixes https://github.com/profanity-im/profanity/issues/497
2022-06-16 21:07:15 +03:00
Michael Vetter
35d10868f4
Reset buffer correctly
2022-06-15 15:09:38 +02:00
swirl
7276db07f4
remove memset in cons_show_qrcode
...
Signed-off-by: swirl <swurl@swurl.xyz >
2022-06-15 08:36:24 -04:00