* 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>
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.
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.
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.
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.
`/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
"" 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
Messages would get duplicated when you chat with yourself, worse if you
had omemo enabled the duplicated message would say something along the
lines of "Your client doesn't support OMEMO". The cause was carbons
when the message was sent from another client, whilst it was a sent
and received message when profanity was the one to send it. This commit
ignores the carbon message in the 1st case and ignores the received one
in the 2nd.
Fixes https://github.com/profanity-im/profanity/issues/1595
All QR scanners should be able to recognize this, as it is now the
correct color with some padding to prevent blending.
Signed-off-by: swirl <swurl@swurl.xyz>
TODO: We need to find a way to switch the colors of the QR code, so that
more QR readers can detect it, without "blending" the edges of the QR
code with the surrounding terminal window.
Signed-off-by: swirl <swurl@swurl.xyz>
Muc configuration in profanity used to not update until next login, ie:
make muc non_anonymous and members_only but be unable to start omemo
until next login. Now a disco info request is sent after forrm submit
and chatroom details are changed accordingly.
Fixes https://github.com/profanity-im/profanity/issues/1347
Profanity would ignore the silent nick change in some places. The roster
and history would show the correct nick, new messages from the current
user and the "Autojoined <jid> as <nick>" message would show the wrong
one. This commit fixes that problem.
Fixes https://github.com/profanity-im/profanity/issues/757
`/ox discover` segfaults on some misconfigured? nodes because there are
newlines before and after some pubkey-metadata stanzas so the newlines
get treated as seperate stanzas. This commit just skips each stanza in
public-keys-list that doesn't have a fingerprint.
Fixes https://github.com/profanity-im/profanity/issues/1713
Use `/avatar set <path>` where <path> is an image file to upload a new
avatar for the current user. When the avatar is too big it gets scaled
down. Scaling code copied from dino.
Fixes https://github.com/profanity-im/profanity/issues/1687
We only want to have the decrypted message or the alternative body in
message->plain.
Also let's print error messages if it makes sense and log other issues.
Partly addresses the commit in the comit mesage of:
2dc0cc489c
Maybe we can make this configurable later.
So users have the freedom to be more strict.
This commit partly reverts 62018f48c5.
Example to edit trust level:
```
gpg --edit-key somekeyid
gpg (GnuPG) 2.3.4; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
pub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: SC
trust: unknown validity: full
sub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: E
[ full ] (1). xmpp:user@domain.de
gpg> trust
pub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: SC
trust: unknown validity: full
sub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: E
[ full ] (1). xmpp:user@domain.de
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
Your decision? 3
pub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: SC
trust: marginal validity: full
sub rsa4096/keyid
created: 2020-06-26 expires: 2022-06-26 usage: E
[ full ] (1). xmpp:user@domain.de
Please note that the shown key validity is not necessarily correct
unless you restart the program.
gpg> quit
```
* Added logging messages (INFO if key can not be used)
* Check owner_trust < GPGME_VALIDITY_MARGINAL
The key can not be used if the owner_trust is less than MARGINAL.
@mdosch discovered that we now don't print `:` for messages from others
anymore.
Until
https://github.com/profanity-im/profanity/pull/1663#issuecomment-1114625151
is fixed lets restore the default behaviour to always add `:` in
`_win_print_internal()`.
The result will be that a stamp set to `-->` will also look like `-->:`.