1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

348 Commits

Author SHA1 Message Date
Marouane L
f934c5b59f
Add vCard support
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)
2022-10-18 23:24:30 +01: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
MarcoPolo-PasTonMolo
91e8a89b59 Fix duplicate messages in chat with oneself.
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
2022-05-31 15:55:02 +03:00
Michael Vetter
1330ad4e1e Update copyright year 2022-05-09 15:43:33 +02:00
Michael Vetter
be55b16bef Restore default behaviour for stamps
@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 `-->:`.
2022-05-03 12:17:29 +02:00
Michael Vetter
27f25172e9
Merge branch 'master' into add_stamp_settings 2022-04-28 19:33:23 +02:00
Michael Vetter
6c5d983f13 Rename stamp preference variable
PREF_INCOMING_STR -> PREF_INCOMING_STAMP
PREF_OUTGOING_STR -> PREF_OUTGOING_STAMP
2022-04-28 19:29:27 +02:00
Artjom Vejsel
2c003dd2e1 add /stamp command
command allow override standard stamps of incoming and outgoing messages
2022-04-02 00:23:08 +03:00
Paul Fertser
4290d87df9 Use correct colour for their nick when showing history 2022-04-01 17:14:48 +03:00
Steffen Jaeckel
1c7bae4ae9 fix linter warnings
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 14:29:56 +02:00
Steffen Jaeckel
2ca63d1d5f run make format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
MarcoPolo-PasTonMolo
fb790a955b Use funcs available in all glib versions to replace \n in quotes 2022-03-21 14:52:17 +02:00
MarcoPolo-PasTonMolo
06ef6842e8 Add quote autocompletion for previous messages
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.
2022-03-21 13:46:50 +02:00
Steffen Jaeckel
9cf78e59d5 auto-format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-01 15:01:28 +01:00
MarcoPolo-PasTonMolo
da3a6d8743 Move declaration and definition of win_get_last_sent_message to the correct place 2021-10-22 10:24:51 +03:00
Michael Vetter
f21595597f Format code correctly 2021-10-05 10:01:27 +02:00
DebXWoody
1526a00123
Attention flag - Implemented Alt+m 2021-05-29 20:16:21 +02:00
DebXWoody
6dd11f0fff
Attention flag for groupchats
Attention flag for groupchat and display the windows via "/wins attention"
2021-05-29 09:30:13 +02:00
DebXWoody
3520645366
Attention flag for chat windows
User is able to toggle a flag for chat windows. This flag should be used to mark
the window for "Attention".

Use Ctrl+f to mark the window.
2021-05-29 08:05:03 +02:00
Thorben Günther
f1780f0017
MUC: Show offline members in sidebar 2021-03-08 14:34:59 +01:00
Stefan
45e4d26296 Bugfix: Titlebar show name without room name
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.
2021-02-14 21:00:05 +01:00
Michael Vetter
8c08e64f37 Update copyright 2021-01-08 16:36:30 +01:00
kaffeekanne
4e999283f0 Remove blank line after trackbar
Remove added blank line after trackbar, introduced by 606c1e51e6
2020-12-11 16:10:26 +01:00
Michael Vetter
63843342c3 Remove old TODO
It was added in f7fe87dd4e when I rewrote
window functions to include more infos (not just char* but whole jid
struct I think).
The same todo was added to win_print_outgoing_muc() but removed in
f3d9de133e.

This TODO should have been removed in
f3d9de133e since there we added the myjid
parameter.
2020-12-11 13:47:40 +01:00
Michael Vetter
d5415b99a6 Fix color for win_print_outgoing()
Discovered by @aba-hollerer.

Mistake was introduced in b6b7dd5ad4
probably due to a wrong copy/paste.

First wasn't reproducible because I had `/receipts request on` and thus
win_print_outgoing_receipts() is used which has the correct
THEME_TEXT_ME.

Fixes https://github.com/profanity-im/profanity/issues/1441
2020-12-11 12:14:27 +01:00
Michael Vetter
b12183aa1a Remove empty line 2020-12-10 14:40:25 +01:00
Michael Vetter
606c1e51e6 Expand trackbar to whole line
Fix https://github.com/profanity-im/profanity/issues/1448
2020-12-09 10:21:32 +01:00
William Wennerström
4711fc62a3
Run make format on rebase 2020-11-16 21:58:09 +01:00
William Wennerström
9499df6585
Add http_download tool 2020-11-16 21:58:09 +01:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00
nia
ce67753423 Avoid passing NULL pointers to curses functions.
This allows profanity to work without segfaulting from NULL
pointer dereferences when used with NetBSD libcurses.

Basic functionality was tested, there may be more NULL pointer
issues hiding.
2020-09-04 12:59:20 +02:00
nia
52e9be4abc Basic support for building on NetBSD.
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
2020-09-04 12:55:20 +02:00
Michael Vetter
5db840e0cc Fix memleak in win_print_outgoing_with_receipt()
We should actually process the receipts also in LMC I think.

Regards https://github.com/profanity-im/profanity/issues/805
2020-07-23 10:06:49 +02:00
Michael Vetter
a2726b6a7d Apply coding style 2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa Revert "Apply coding style"
This reverts commit 9b55f2dec0.

Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0 Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
e5ac12afa6 Remove prefs_free_string()
It just does a free.
Related to b580b9ef11
2020-07-02 11:34:12 +02:00
Stefan Kropp
7d6ef8f4c8 Initialize is_ox in win_create_chat()
Fixes an issue where messages are displayed as OX when they are not.
2020-07-01 09:23:23 +02:00
DebXWoody
2c94ee5a88 Feature request - XEP-0373: OpenPGP for XMPP (OX)
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html

Command /ox

Issue: #1331
2020-06-29 19:05:41 +02:00
Michael Vetter
85520ecdc5 Remove unanimous MAM display
For some time users could choose to have the old way "unanimous" where
all the MUC history is just grey (or whatever was set). Now it is always
just displayed like regular new incoming MUC text.
2020-04-25 17:19:02 +02:00
Dmitry Podgorny
4672d0ca19 ui: fix condition
Fix mistake in a condition. Also add sanity check to
win_refresh_with_subwin().
2020-04-23 14:30:49 +03:00
Michael Vetter
f27bd92731 Make compiler happy about win_refresh_without_subwin 2020-04-20 16:44:47 +02:00
Michael Vetter
b1d71236fe win_refresh_with_subwin() fixup
Fixup for 86af6925d9
2020-04-20 16:35:13 +02:00
Michael Vetter
86af6925d9 Simplify win_refresh_with_subwin() 2020-04-20 16:09:40 +02:00
Michael Vetter
180ec2b474 Add to_jid field to ProfMessage struct
Is usefult in many cases if we want cleaner code.
Hope this edit didn't break anything though ;-)
2020-04-11 17:11:53 +02:00
Michael Vetter
f42f856d37 Retrieve message type from database
So we don't have to check for MUC another way.
2020-04-08 12:50:23 +02:00
Michael Vetter
bd116e6ad9 win_print_history() print 'me' on regular chats if we wrote the message
Same behaviour like when we used to get it from the text files.
2020-04-06 15:48:23 +02:00
Michael Vetter
067bc690f2 Adapt win_print_history() to work with muc too 2020-04-06 15:33:01 +02:00
Dmitry Podgorny
37c200571f Fixed memory leak in ProfMucWin
Profanity remembers last message and its id for the message correction
feature. We must free them in window destructor.
2020-04-03 01:47:38 +03:00
Michael Vetter
4fc938d804 Add setting to not colorize own nick according to xep-0392
Some users might want there nick to always stay white (etc) for easier
recognition.

Now we can do `/color own off` to not generate the color based on
xep-0392. The `me=` color (etc) from the theme will then be used.

Once we run this command `theme_load()` is called again.
And the theme looks totally wrong.
We encountered this at other times already and I think it's nothing
wrong with this new code here now but that there seems to be a missing
closing attr for the color when drawing.

Should be investigated seperately.

Fix https://github.com/profanity-im/profanity/issues/1288
2020-03-25 12:54:25 +01:00