1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

1689 Commits

Author SHA1 Message Date
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
95ab7ee062 Setting: only write in console upon muc mention
`/console muc mention` additionally to `first|none|all`.

Fix https://github.com/profanity-im/profanity/issues/1371
2020-07-10 15:16:34 +02:00
Michael Vetter
7b49fbdf45 Pass window to functions so we dont have to call twice 2020-07-09 16:11:50 +02:00
Michael Vetter
11d849aa7f Dont hilight console once all messages have been read
If we receive a message we get:
<< room message: eagle@conference.anoxinon.me (win 2)

Same for private chats and regular chats.
And several other kinds of notifications.

If we only receive notifications from a chat window it would be nice to
also clear the hilight on the console window since we already catched up
by reading the actual message in the chat window.

Probably not the best description :-) I hope you get it..

Regards https://github.com/profanity-im/profanity/issues/1399
2020-07-09 15:44:35 +02:00
Michael Vetter
8a2026ccbe Make _show_roster_contacts static 2020-07-09 08:48:10 +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
Michael Vetter
9774b0c550
Merge pull request #1374 from profanity-im/revampUrlopen
Rework /url and /executable for filetypes
2020-07-02 11:26:18 +02:00
Michael Vetter
86cd33405e Add note that /executable needs more work 2020-07-02 11:18:37 +02:00
Michael Vetter
59f5b81b85 cmd_url_*(): use gchar instead of char 2020-07-02 10:58:31 +02:00
Michael Vetter
8be1e44cea Adjust /executable test to be more precise 2020-07-01 15:42:26 +02:00
Michael Vetter
2b5160a351 console.c: Use prefs_free_string()
f9961677aa  replaces prefs_free_string()
with g_free(). Both is correct but lets still use this.
2020-07-01 14:50:07 +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
Pierre Mazière
f9961677aa Display default value for /url associated commands
The display of commands associated with specific file
types and protocols will need to be implemented later,
but this requires to use private data of the GKeyFile
structure, which can be a maintainability issue on the
long term.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:03:20 +02:00
Pierre Mazière
64eb11fbaf Add aesgcm to urls grabber
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:02:56 +02:00
Dmitry Podgorny
09e12a826f Fix gcc warnings for cygwin
strncpy(3) is not so safe function and can lead to mistakes. For
example, strncpy(dest, "Profanity", 10); is redundant and leads to
problems when someone changes the source string.

Different example is when 3rd argument equals to length of the
destination buffer. strncpy(3) doesn't terminate string with '\0' when
it truncates. Therefore, the destination string becomes corrupted.

Zeroize storage for 'nid', so the last byte remains '\0' in case of
truncate.
2020-06-24 16:29:19 +03:00
Michael Vetter
74e061165a Define POSIX macro to have strdup
98c38dc6d6
sets C99 as standard.

strdup() is not part of C99.

For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.

We should take more care to use glib functions whenever possible.

Regards https://github.com/profanity-im/profanity/issues/1357
2020-06-12 16:12:21 +02:00
Dmitry Podgorny
ac410445af Add option for legacy authentication
New options:
  /connect <account> [auth default|legacy]
  /account <account> set auth default|legacy

Fixes #1236.
2020-06-05 11:37:51 +03:00
Michael Vetter
bfaf737efa urlopen: get last URL first
Fix https://github.com/profanity-im/profanity/issues/1348
2020-05-29 11:26:18 +02:00
Michael Vetter
d251b56166 Fix titlebar write position
Mistake introduced in 86f0e0ea70
The functions later on dont set an explitic position when writing their
strings.

Fix https://github.com/profanity-im/profanity/issues/1346
2020-05-27 08:59:00 +02:00
Michael Vetter
1cfab017a4 Handle listing ignored bookmarks when none are ignored 2020-05-25 13:38:47 +02:00
Michael Vetter
de8975c008 Add and use connection_get_barejid()
Instead of connection_get_fulljid() and then creating a Jid from it.
2020-05-25 13:04:19 +02:00
Michael Vetter
f121554088 List ignored bookmarks
`/bookmarl ignore` lists the ignored bookmarks.

Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 17:55:08 +02:00
Michael Vetter
090732ed96 Fix invalid read in titlebar 2020-05-24 13:47:21 +02:00
Michael Vetter
86f0e0ea70 Dont show resource in titlebar if it is too long
Fix https://github.com/profanity-im/profanity/issues/715
2020-05-22 20:42:44 +02:00
Michael Vetter
fad296b79e Display bookmark name
Have field in struct and display the name in `/bookmark list`.

Regards https://github.com/profanity-im/profanity/issues/697
2020-05-22 13:56:00 +02:00
Michael Vetter
cb78ee4665 Make option to allow hiding windows with no messages in statusbar
`statusbar.show.read` can be set to false in the config.
`/statusbar show|hide read`.

Implement https://github.com/profanity-im/profanity/issues/1285
2020-05-21 16:15:14 +02:00
Michael Vetter
fcd69532ad Make 'scrolled' themeable 2020-05-21 09:16:18 +02:00
Michael Vetter
469fa8f863 Display when scrolled up
Display [SCROLLED] in titlebar if a chat/muc/private win is scrolled up.

Implement https://github.com/profanity-im/profanity/issues/1289
2020-05-21 09:14:45 +02:00
Michael Vetter
7b541d0a6d Add /executable command
This is used to set the openers for various commands.
So far for /avatar and /urlopen.
2020-05-20 14:14:49 +02:00
Michael Vetter
aef74f90ec Only save max 20 urls 2020-05-20 10:54:58 +02:00
Michael Vetter
ce32d874e0 Build URL ac upon printing of message in window 2020-05-20 10:54:54 +02:00
Michael Vetter
22ca81e0b6 Look for URLs via regex 2020-05-20 10:47:46 +02:00
Michael Vetter
083bf34a77 Start urlopen feature
Start https://github.com/profanity-im/profanity/issues/1340
2020-05-20 10:47:40 +02:00
Michael Vetter
5cf6ee1bc6 Fix /correction char display
1f8b1eb740 made it possible to have utf8 chars as correction chars. So since then prefs_get_correction_char() doesn't return a regular char but a char*.
Seems like there was an oversight that we need to use %s then.
2020-05-06 13:46:40 +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
4a712fcc7b Fixup for bad56b5062
sorry.. doing too many things at once..
2020-04-22 17:01:27 +02:00
Michael Vetter
bad56b5062 wins_show_subwin(): Add windows type test
Fix https://github.com/profanity-im/profanity/issues/1321
2020-04-22 14:03:29 +02:00
Michael Vetter
813fd637a1 inp_readline() Correct slashguard feature
Protect against invalid reads by checking the length.
2020-04-21 16:47:18 +02: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
fb85cec129 Remove unused func wins_close_current() 2020-04-20 16:16:18 +02:00
Michael Vetter
9e73782f72 _destroy_tab() dont set tab to NULL
Setting the local pointer to NULL has no effect.

_destroy_tab() is used for g_hash_table_new_full() so we cant use a **
and set tab to NULL.
2020-04-20 16:10:24 +02:00
Michael Vetter
86af6925d9 Simplify win_refresh_with_subwin() 2020-04-20 16:09:40 +02:00
Michael Vetter
70683c07ab _mucwin_print_mention(): No need to assign pos 2020-04-20 16:02:19 +02:00
Michael Vetter
b2ec6ba4ce ui_room_join() dont get nick twice 2020-04-20 16:01:05 +02:00
Michael Vetter
785e3f5623 cons_show_aliases() simpify condition 2020-04-20 15:59:31 +02:00
Dmitry Podgorny
1f0159de36 Make _inp_edited() more robust 2020-04-19 00:19:16 +03:00
Michael Vetter
9be7d29f1b Don't expose upload_processes
That's actually not good practise.
Realized this when checking for multiple symbol definition in issue
mentioned below.

Regards https://github.com/profanity-im/profanity/issues/1314
2020-04-17 10:05:09 +02:00
Dmitry Podgorny
b3eea13125 Free GError objects
glib functions can allocate a GError object that must be freed with
g_error_free(). Otherwise a memory leak happens.

There are similar unfixed places in omemo, check:
    grep "&error" src/omemo/omemo.c

Fixes #1304.
2020-04-14 03:26:49 +03:00
Michael Vetter
a42c2a1134 Only print chathistory if regular chat message
MUCPMs and regular chat messages get printed with the same code.
But we don't save MUC PMs in the sqldb, because another jid could use
the same nick the next time.

And if we would take the log out we would need a different routine,
checking for resourcepart too.

Fix https://github.com/profanity-im/profanity/issues/1312
2020-04-13 21:57:28 +02:00
Michael Vetter
51518497e5 Add hidden MAM setting and trigger MAM retrievel when opening new window
Only when we start the conversation.
Not yet when we get messaged and a new window is opened.
Need to have sorting of messages in the window buffer then, I guess.
Also MAM IQ should only be send one time in such a case.

If MAM is enabled history from sql backend will not be shown.

`mam` in profrc enables experimental MAM.
Can change soon again. Don't rely on stuff in this stage ;)
2020-04-12 00:42:02 +02:00
Michael Vetter
dd566d8d56 MAM: Correctly display incoming MAM chat message 2020-04-11 23:56:01 +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
e23bc38083 Quick and dirty display of MAM messages 2020-04-11 16:05:14 +02:00
Dmitry Podgorny
70ad4d4a38 Fix memory leaks in cons_roster_setting() 2020-04-10 23:43:00 +03:00
Dmitry Podgorny
aa4faf6075 Fix memory leaks in _rosterwin_resources() 2020-04-09 15:17:34 +03: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
5862e5b159 db: Fix memleaks 2020-04-06 16:09:38 +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
Michael Vetter
0942d98c61 Remove chat_log_get_previous()
We now dont get the log files from the text files via chat_log_get_previous() anymore.
We use the sql backend via log_database_get_previous_chat().

So far it just has the same behaviour like chat_log_get_previous(),
except that in _chatwin_history() we don't pass the sender to
win_print_history() which should be fixed in a commit soon.

And log_database_get_previous_chat() can later easily be expanded to fix
https://github.com/profanity-im/profanity/issues/205.
2020-04-06 14:42:52 +02:00
Michael Vetter
5d54bb228f Get regular chat history out of sql backend 2020-04-06 14:30:38 +02:00
Dmitry Podgorny
42b6d78a70 Fix multiple memory leaks related to rosterwin_roster()
There are multiple paths which lead to rosterwin_roster(). The function
doesn't free list returned by wins_get_private_chats().
2020-04-06 14:29:21 +03:00
Dmitry Podgorny
ba291a03f4 Fix memory leak in cons_show_disco_info() 2020-04-06 13:29:36 +03:00
Dmitry Podgorny
dc5ddb8ebe Fix memory leak in _rosterwin_resources() 2020-04-05 15:57:27 +03: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
Michael Vetter
f131680055 titlebar: allow displaying MUC name and MUC jid
`/titlebar use name|jid` -> `/titlebar show|hide name|jid`

Fix https://github.com/profanity-im/profanity/issues/1284
2020-03-24 22:22:16 +01:00
Michael Vetter
fd090d384d move titlebar code in correct function 2020-03-24 21:46:40 +01:00
Michael Vetter
3c56b289ed Add slashguard feature
New command `/slashguard` tries to protect against typing ` /quit` by
not allowing a slash in the first 4 characters.
2020-03-18 18:20:05 +01:00
Michael Vetter
52e7e596aa xep-0084/avatar: add option to open avatar directly
Change:
`/avatar me@somewhere.org` -> `/avatar get me@somewhere.org`

New:
`/avatar cmd feh`
`/avatar open me@somewhere.org`

Implement https://github.com/profanity-im/profanity/issues/1281
2020-03-10 07:12:13 +01:00
Michael Vetter
7e62d458ee Make statusbar tab more resilient
If users input strange stuff and we can't create a jid from it even the
setting is set to 'user' we still should fallback to the regular
identifer.

For example with `/msg @name%matrix.domain.org@matrix.org hi`.
2020-03-09 16:33:42 +01:00
Michael Vetter
a3889c94bc Rename ProfBufferEntry jid variable 2020-03-09 13:33:48 +01:00
Michael Vetter
f3d9de133e Check for sender of LMC message 2020-03-09 13:31:49 +01:00
Michael Vetter
f7fe87dd4e Write from jid in buffer
Not all cases covered yet.
2020-03-09 12:52:47 +01:00
Michael Vetter
95a16c2486 Add barejid to buffer struct 2020-03-09 12:47:43 +01:00
Michael Vetter
441e31984e Remove old comments 2020-03-09 12:31:49 +01:00
Michael Vetter
56836fb72d Use correct MUC message timestamp
win_println_incoming_muc_msg() always used the current time. Now let's
use whatever is sent int he message struct (from the delay stanza or
the current time that we set now once the message is received).

No playing with the time upon display anymore.
2020-03-09 12:22:36 +01:00
Michael Vetter
3d7e6fae7c Use ProfMessage as parameter for win_println_incoming_muc_msg() 2020-03-09 12:00:15 +01:00
Michael Vetter
0801623018 window.c: Rename variable 2020-03-09 11:51:32 +01:00
Michael Vetter
ca14f3a1a2 Fix memory leak in win_create_muc()
I suspect this was just a copy paste error.
`_win_create_simple_layout()` is called in other creation functions like
`win_create_config()` or `win_create_private()`.

I suspect when `win_create_muc()` was created it was just copied. But in
this function we actually set the layout ourself later.

So calling the function isn't needed.

Regards https://github.com/profanity-im/profanity/issues/1279
2020-02-27 16:14:54 +01:00
Michael Vetter
fc35a5a492 Stop buffer_remove_entry_by_id() once we found the entry
No need to continue to loop through the rest.
2020-02-25 16:11:59 +01:00
Michael Vetter
f597de4889 Properly free buffer entry
g_slist_delete_link() is not enough we also need to call _free_entry()
on the entry.

This fixes a memleak in win_insert_last_read_position_marker()
2020-02-25 16:06:00 +01:00
Michael Vetter
1a87d7be3e Only use enc_char in win_print_incoming() when needed
Fixes potential memory leak too.
2020-02-25 14:52:38 +01:00
Michael Vetter
99dc1c9494 Rename separator to trackbar 2020-02-21 19:17:12 +01:00
Michael Vetter
6dbbbe11e5 Make trackbar color configurable
Use `main.trackbar` in themes.
2020-02-21 19:12:16 +01:00
Michael Vetter
eb2fbdba2e Dont filter out own MUC messages if muc history is set to 'regular'
We use the same incoming function as for regular incoming text here. But
don't want to filter out our own messages since we didn't print them
during sending.

Follow up to 8ee2cdadc8
2020-02-21 18:46:09 +01:00
Michael Vetter
7fdc4ed7f6 win_print_incoming() strdup the charactar
Fix bug introduced in 1f8b1eb740.
Forgot to strdup() here.
2020-02-21 08:02:11 +01:00
Michael Vetter
1f8b1eb740 Allow utf8 symbols as omemo/pgp/otr indicator char
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
8ee2cdadc8 Parse mentions and triggers in muc history if display is 'regular'
Fix https://github.com/profanity-im/profanity/issues/1261
2020-02-20 10:28:24 +01:00
Michael Vetter
80dd3fdbb2 Add option to color MUC history like regular messages
`/logging group color` has:
* `unanimous` which will color it with one unanimous color. Like it was
done always.
* `regular` which colors it like regular incoming messages.

Regards https://github.com/profanity-im/profanity/issues/1261
2020-02-20 08:11:58 +01:00
Michael Vetter
6aa793fca6 Refactor mucwin_history()
Just pass ProfMessage.
2020-02-19 16:57:37 +01:00
Michael Vetter
cf36a92dcb Add define names to comment 2020-02-19 16:36:54 +01:00
Michael Vetter
b4c6470df4
Merge pull request #1269 from wstrm/add-sr.ht-ci
Add builds.sr.ht CI for OpenBSD
2020-02-17 16:47:52 +01:00
Michael Vetter
ea5a947f52 Refactor win_print_history()
We never use the printf like behaviour anyways.
2020-02-17 12:05:58 +01:00
Michael Vetter
6e68f1812b Refactor win_print_outgoing_muc_msg()
We never use the printf like behaviour anyways.
2020-02-17 12:03:23 +01:00
Michael Vetter
f13ea11f95 Refactor win_println_incoming_muc_msg()
We never use the printf like behaviour anyways.
2020-02-17 11:58:36 +01:00
Michael Vetter
69d474b3a7 Refactor win_print_outgoing()
We never use the printf like behaviour anyways.
2020-02-17 11:48:50 +01:00
William Wennerström
b267b065f5
Add builds.sr.ht CI for OpenBSD
* Add .builds/openbsd.yml for builds.sr.ht
* Update travis-build.sh -> ci-build.sh with OpenBSD case
* Fix libdl check in configure.ac (OpenBSD has libdl built-in)
* Fix some minor issues found when compiling on OpenBSD with GCC (e.g.
  uninitialized variables)
2020-02-17 10:54:15 +01:00
Michael Vetter
7d596d8cef Make /sendfile in PGP session configurable
`/pgp sendfile on` allows unencrypted file transfer in an PGP session.

Regards https://github.com/profanity-im/profanity/pull/1270
2020-02-17 08:57:35 +01:00
Michael Vetter
86bcadcbe3 Make /sendfile in OTR session configurable
`/otr sendfile on` allows unencrypted file transfer in an OMEMO session.

Regards https://github.com/profanity-im/profanity/pull/1270
2020-02-17 08:51:43 +01:00
Michael Vetter
36713a2ed7 Make /sendfile in OMEMO session configurable
`/omemo sendfile on` allows unencrypted file transfer in an OMEMO
session.

Regards https://github.com/profanity-im/profanity/pull/1270
2020-02-17 08:31:46 +01:00
Michael Vetter
421c67e284 Add workaround for compiler warning
Regards https://github.com/profanity-im/profanity/issues/1265
2020-02-14 11:23:19 +01:00
Michael Vetter
fcfb493dfb Rename buffer->from to buffer->display_from 2020-02-14 10:17:07 +01:00
Michael Vetter
e27c414f1f xep-0308: enable for carbon copied messages
If we are connected with another client and send a message, then correct
it. We now display it correctly in Profanity.

Id wasn't saved for carbon copied messages too so far.
2020-02-14 10:17:07 +01:00
Michael Vetter
9b3593bdf9 xep-0308: enable correction in outgoing messages with delivery receipts 2020-02-14 10:17:07 +01:00
Michael Vetter
3e901aee99 Rename win_print_with_receipt() -> win_print_outgoing_with_receipt() 2020-02-14 10:17:07 +01:00
Michael Vetter
3a1be74e93 Add myself to copyright 2020-02-14 10:17:07 +01:00
Michael Vetter
2900bf4aef Rename win_println_them_message() -> win_println_incoming_muc_msg()
In aa3693daa211b36c78d136d5a1ee9f3258e21352 I renamed
`win_println_me_message()` -> `win_print_outgoing_muc_msg()`.

Now: `win_println_them_message()` -> `win_println_incoming_muc_msg()`
to be more consistent and descriptive.
2020-02-14 10:17:07 +01:00
Michael Vetter
50271493b7 xep-0308: remove replace_id from privwin signature
No `/correct` allowed in privwins
2020-02-14 10:17:07 +01:00
Michael Vetter
743ec6afd0 xep-0308: only replace messages if the user enabled the feature
Outgoing `/correct` will still work.
2020-02-14 10:17:07 +01:00
Michael Vetter
4ec005e4c3 xep-0308: Implement LMC for outgoing MUC messages
Including OMEMO encrypted ones.
Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg()
as I think it's a more descriptive name.
2020-02-14 10:17:07 +01:00
Michael Vetter
66d3f572f9 xep-0308: Dont allow to correct MUC PMs
People could change messages of other people if the nick isn't
registered.
2020-02-14 10:17:00 +01:00
Michael Vetter
7cd1be36f2 xep-0308: Display corrected incoming MUC messages correctly 2020-02-12 12:56:34 +01:00
Michael Vetter
38c32be14c Distinguish between _win_print() and _win_printf()
_win_print() and _win_printf() sound like they are the same. But
actually they are something totally different.

I renamed _win_print() to _win_print_internal() for that reason. It's
more about actually drawing to the ncurses window.

_win_printf() calls _win_print() and also writes the text to the window
buffer. Which _win_print() didn't, it was really just the ncurses
specific things.

In some cases there is _win_print_internal() called after a
buffer_append() in those cases it might be more correct to actually call
_win_printf().
It was not done so far. But probably is better. But will mean a bit more
operations.

I'll have to check this later.
2020-02-12 08:32:34 +01:00
Michael Vetter
0482a80f8a Rename win_correct_incoming to win_correct
and make it static.
2020-02-12 07:07:54 +01:00
Michael Vetter
b6b7dd5ad4 xep-0308: update the UI upon sending a corrected message
So far we don't do this for encrypted messages. Still needs to be done.
And MUC also needs to be done.
2020-02-11 15:26:58 +01:00
Michael Vetter
1118110071 xep-0308: Implement /correct to correct the last send message
So far the correction is sent. But the UI in Profanity itself is not
updated.

Also autocompletion for `/correct` with the last sent message is
missing.
2020-02-10 16:17:01 +01:00
Michael Vetter
dd8086772d xep-0308: create setting to toggle lmc
and print settings if only `/correction` is run.
2020-02-10 14:52:42 +01:00
Michael Vetter
039bf5d04d xep-0308: add correction autocompletion 2020-02-10 13:35:46 +01:00
Michael Vetter
f16d56a15e xep-0308: Initial support for incoming LMC 2020-02-10 13:19:54 +01:00
Michael Vetter
772224421d Clear buffer upon /clear
I think both the window and the buffer should also be cleared in case
`/clear` is issue and persist_history is off.

Otherwise it could happen that win_redraw() redraws the whole content of
the buffer again.
2020-02-07 15:52:24 +01:00
Michael Vetter
c73d70171b rosterwin: end correct colors
Actually presence_colour should be stopped there.
Thanks to rumin-miller for finding this.
2020-02-03 11:41:13 +01:00
Paul Fariello
a52e3ea1d8 Add context to autocomplete_with_func and use it for omemo trust command
Fix #1068
2020-01-31 10:07:08 +01:00
Michael Vetter
cd80b6cbf2 Change theme handling
So far when loading a theme it also overwrote the preferences the user
set.

Lengthy discussion can be found at
https://github.com/profanity-im/profanity/issues/1077

Now we use `/theme load themename` to load the [colours] part of a
themem only.

`/theme full-load themename` will load the complete theme including
preferences set in there.

Regards https://github.com/profanity-im/profanity/issues/1077
2020-01-29 12:33:55 +01:00
Michael Vetter
4bc82a5318 XEP-0092: Add configuration option to choose whether to send OS name
`/os on|off` now let's one choose whether to include the OS name once
`/software` (XEP-0092) is ran on us.
2020-01-24 19:27:42 +01:00
Michael Vetter
fd38c7adae Add myself to copyright 2020-01-23 19:58:31 +01:00
Michael Vetter
6567936406 Refactor rosterwin_roster()
Use helper function for duplicate code.
2020-01-23 19:52:41 +01:00
Michael Vetter
56b7482b08 Add option to display MUC name or JID in titlebar
Add `/titlebar use [name|jid]`.
2020-01-23 19:42:22 +01:00
Michael Vetter
0401412c64 Display MUC name in titlebar 2020-01-23 18:53:14 +01:00
Michael Vetter
036389e8c5 Fix spacing in titlebar.c 2020-01-23 18:48:54 +01:00
Michael Vetter
08a3f94a89 Print roster rooms use in info page 2020-01-23 18:38:52 +01:00
Michael Vetter
10c4032d12 Respect /roster room use setting also when sorted for service 2020-01-23 18:29:49 +01:00
Michael Vetter
31509022ef NULL room_name in win_create_muc() 2020-01-23 18:22:36 +01:00
Michael Vetter
9e35861001 Add /roster room use command
`/roster room use name` to use the name of the MUC in the roster list.
`/roster room use jid` to use the jid of the MUC in the roster list.

Display it only in case `/roster room by none` is set so far.
2020-01-23 16:50:43 +01:00
Michael Vetter
3066fd77fc Save MUC room name in ProfMucWin
We will need this if we want to display the Name instead of the JID.
2020-01-23 11:35:33 +01:00
Michael Vetter
dac6d088d0 rosterwin: remove duplicate if 2020-01-22 09:30:09 +01:00
Michael Vetter
be13e98fe7 Update my Copyright to 2020 2020-01-03 19:52:31 +01:00
Michael Vetter
abd8e3d6c5 Adjust /color configuration output
Fix https://github.com/profanity-im/profanity/issues/1243
2019-12-20 10:05:58 +01:00
Michael Vetter
fdd6897eee Add workaround for stupid compiler warning
Makes travis builds for TW, Debian and Arch fail.
2019-12-19 20:38:05 +01:00
Michael Vetter
808850c6f5 Add /occupants color command
`/occupants color on|off` to enable or disable XEP-0392 also for the
MUC occupants.

Regards
https://github.com/profanity-im/profanity/issues/1191
2019-12-19 19:14:59 +01:00
Michael Vetter
0af54d8a72 Add /roster color command
`/roster color on|off` to enable or disable XEP-0392 also for the
roster.

Regards https://github.com/profanity-im/profanity/issues/1191
2019-12-19 18:53:22 +01:00
Michael Vetter
c302af99b7 xep-0392: colorize roster 2019-12-19 14:02:24 +01:00
Michael Vetter
3036834ec8 separator: Enable for MUC and PRIVWIN too
Fix https://github.com/profanity-im/profanity/issues/1238
2019-12-13 13:13:02 +01:00
Michael Vetter
e2b44a69bd separator: Print only one for each chat window
So far we printed one after the last received message, which doesn't
make much sense of course.
Now only print one if there is not already one present.
2019-12-13 12:47:27 +01:00