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
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.
I think this PR already solves and improves the MAM situation a lot.
What's @MarcoPolo-PasTonMolo still wanted to do in this branch is:
* MAM for mucs
* Check if url and quotes autocompletion works fine
* Check if the api still works fine
* Resolve conflicts
Conflicts are solved with this commit.
MAM for mucs can be another feature PR.
The rest we can check while being on master. And more people can help
testing.
Only nicknames, photos, birthdays, addresses, telephone numbers, emails,
JIDs, titles, roles, notes, and URLs are supported
Due to the synopsis array not having enough space, `/vcard photo
open-self` and `/vcard photo save-self` are not documented properly in
the synopsis section of the `/vcard` command, but they are documented in
the arguments section
Fixed memory leak in vcard autocomplete (thanks to debXwoody)
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.
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>
@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 `-->:`.
When editing multi-line messages or comments everything past the first
newline becomes invisible.
This patch fixes it by substituting a Unicode symbol for "return"
instead of printing the newline as is. On locales where it's not
available single backslash is used instead.