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.
The current code is inherently racy: if screen update takes
considerable time (e.g. when working over network) and a user
performed a series of resizes the final event might get ignored and
the display will be left in inconsistent state.
Fix the race by unsetting the flag first so if the next WINCH signal
is received while display is resizing it'll be processed on the next
iteration.
GNU Screen terminal emulator is modelled after VT100, its key bindings
for "application mode" (which profanity enables on startup) can be
seen with this: info screen "Input Translation".
The current code enters an infinite loop if the input string happens
to get an invalid utf-8 sequence somehow. For me it was reproducible
by running profanity in a Screen session and pressing Alt-т (cyrillic
letter).
Fix it the way borrowed from 0501e49623
where mbrlen is used for the same purposes.
Fixes https://github.com/profanity-im/profanity/issues/1649
Type `>` then press tab or shift tab to autocomplete previous messages,
then type your reply and send message.
Newlines are replaced with newline followed by `> `.
A newline is added at the end so that the user can immediately type a
message without manually adding a new line.
This and the following commits should make a couple of more configs
allow utf8 chars so people can use their weird icons :-)
We did the same for the otr/omemo/pgp indicators at:
1f8b1eb7405cf6ee1bc6
_chatwin_history() reassigns msg->plain without freeing previous
string. This leads to memory leak. As a temporary solution, free
replaced string.
Fixes#1585.
Offset for g_utf8_substring() is higher than the string length. We can
avoid g_utf8_substring() for the tail and simply convert starting offset
to a pointer.
`jubalh: jubalh jubalh` resulted in `20:32:34 - testuser1:
jubalh20:32:34 - testuser1: : jubalh20:32:34
- testuser1: jubalh`
Print date/nick only once at beginning of line.
get_mentions() correctly counts utf-8 chars. So the positions of
mentions we get from there are correct.
But in _mucwin_print_mention() we set position equal to byte.
We need to use utf-8 safe functions here.
Regards https://github.com/profanity-im/profanity/issues/1231
When the connection has been re-established, chat and groupchat with OMEMO
should restat the OMEMO Session.
Fix: #1530
* Added HAVE_OMEMO
* clang-format and user output
* Display the `[ATTENTION]` hint in the titlebar for both chatwins and
mucwins.
* Use THEME_TITLE_TEXT instead of THEME_TITLE_ENCRYPT
* Have separate function `_show_attention` and don't do it in unrelated
`_show_privacy`.
Old: `/intype on|of`
Typing information is printed in console and titlebar.
New: `/intype titlebar|console on|off`
Typing information can be configured in more detail.
Regards https://github.com/profanity-im/profanity/issues/1516
The function `omemo_start_session` was effectively called twice in the
`/msg` command: Once in `chatwin_new` and afterwards in `cmd_msg`. I've
removed the second call.
Error log:
GLib-CRITICAL - g_string_insert_len: assertion 'len == 0 || val != NULL' failed
Check if a room name exists, before adding the name into the title bar.