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

6557 Commits

Author SHA1 Message Date
DebXWoody
64bcc06259
OMEMO: Don't encrypt to yourself (MUC)
Use connection_get_barejid instead of connection_get_fulljid.
2021-05-29 07:30:36 +02:00
DebXWoody
3b020144d5
OMEMO: Don't encrypt to yourself (MUC)
As defined in XEP-0384 the application should not encrypt the message to own
devices. Within a groupchat, yourself are a recipients as well.

We will check the recipients and filter out the own device of the own jid.

This Pull Request will fix Issue: #1541
2021-05-28 21:48:43 +02:00
Michael Vetter
69e3cebf26
Merge pull request #1540 from DebXWoody/feature/omemo-display-deviceid
Display OMEMO device ID
2021-05-28 19:55:13 +02:00
Michael Vetter
6c5fd08698
Merge pull request #1539 from DebXWoody/omemo-logging
Improved OMEMO logging
2021-05-28 19:53:16 +02:00
DebXWoody
9974c68ee8
Display OMEMO device ID
Display the OMEMO device ID which has been generated, when the user generated
OMEMO crytographic materials via /omemo gen.
2021-05-28 17:57:42 +02:00
DebXWoody
de06cd395b
Improved OMEMO logging
The most loggings has been set to debug. Just in case of error / problem the
logging should be done with log-level ERROR or WARNING.

We will see later, which loggings should be switched to log-level INFO.

This improvement has been done to find OMEMO bugs.

See also: #1070 #1530 #1538
2021-05-28 17:45:15 +02:00
Michael Vetter
efe4470372
Merge pull request #1537 from rjc/spelling
Fix spelling of "persistent(ly)"
2021-05-24 19:10:30 +02:00
Raf Czlonka
9170a088cd Fix spelling of "persistent(ly)" 2021-05-23 14:15:16 +01:00
Michael Vetter
56efb1a298 message: correct type checking
Found by DebXWoody.
Led to always be true (which still made it work in most cases).
2021-05-14 16:12:38 +02:00
Michael Vetter
c9df520b5c sponsors: Add Matteo Bini 2021-05-12 16:50:45 +02:00
Michael Vetter
2c61e67e82
Merge pull request #1534 from profanity-im/feat/1531-directmessage
Use direct messages instead of MUC-PMs for non-anonymous MUCs
2021-05-12 16:35:04 +02:00
Michael Vetter
34e261ced5 Print message about new direct message
So users don't get surprised if they don't know the barejid of the nick.
2021-05-12 13:38:40 +02:00
Michael Vetter
722d07adf6 Use direct messages instead of MUC-PMs for non-anon MUCs
In https://github.com/profanity-im/profanity/issues/1070 we have:
`OMEMO encryption for MUC PM (OMEMO MUCs are not anonymous, so we should
start a regular 1:1 in this case instead of MUC PM. A discussion started
to make this a general feature #1531)`

In https://github.com/profanity-im/profanity/issues/1531 we have the
general issue to start regular 1:1 messages instead of MUC PMs if the
room is non-anonymous.

This is like suggested in https://docs.modernxmpp.org/client/groupchat/.
2021-05-12 13:31:20 +02:00
Michael Vetter
5906c4ade1
Merge pull request #1532 from profanity-im/feat/1516-intype
Have separate settings for intype (console/titlebar)
2021-05-11 12:16:09 +02:00
Michael Vetter
64244474d3 Have intype on by default 2021-05-08 19:41:38 +02:00
Michael Vetter
1d8061e89b Have separate settings for intype
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
2021-05-08 19:38:40 +02:00
Michael Vetter
1ef700f918 Reduce scope of dir variable 2021-05-06 17:58:00 +02:00
Michael Vetter
929faae926 command: Simplify return in autocompletion 2021-05-06 17:55:38 +02:00
Dustin Lagoy
2b56e33d16 Fix prof_get_name_from_roster documentation 2021-04-29 14:03:17 -04:00
Dustin Lagoy
2350a94c44 Add plugin get_barejid_from_roster function 2021-04-29 13:50:57 -04:00
Dustin Lagoy
802442fffc Change nick to name in api to match convention
Change all instances of *get_nick_from_roster to *get_name_from_roster
to match the convention of names in the roster itself.
2021-04-28 09:32:20 -04:00
Dustin Lagoy
ed4d2fcfb2 Add plugin prof_get_nick_from_roster function 2021-04-28 09:17:02 -04:00
Michael Vetter
4a94c051a4
Merge pull request #1528 from dustinlagoy/pre-chat-message-display-on-history
Apply pre_chat_message_display hook to history
2021-04-28 09:28:41 +02:00
Dustin Lagoy
9d404971da Apply pre_chat_message_display hook to history 2021-04-27 20:42:30 -04:00
Michael Vetter
c106187db7 command: Fix serversoftware examples 2021-04-18 16:08:50 +02:00
Michael Vetter
8e588d6764 Fix random string generation
Our variable `alphabet` contains 62 alphanumeric symbols + '\0'.
When we use sizeof(alphabet) we will get 63 due to that.
But we want to choose a random numbers from the 62 alphanumeric letters only.

This mistake caused us to have strings with a max length of `length`
instead of the exact length.

When doing https://github.com/profanity-im/profanity/issues/1520
this caused our algo for muc reflection to not catch since we expect the
random ID to be exactly 15 symbols long in `message_is_sent_by_us()`.
2021-04-17 22:37:21 +02:00
Stefan
3ba38eafa8
OMEMO - trust mode (#1506)
Add OMEMO trust mode capabilities.

* ToFu / first usage
* blind trust
* manual
2021-04-17 13:28:54 +02:00
Michael Vetter
c79979401b sponsors: mention new sponsor James Pond 2021-04-16 23:25:21 +02:00
Michael Vetter
d566f3cae1 readme: remove extra mention regarding ml
Already mentioned in SPONSORS.md.
2021-04-16 23:22:42 +02:00
Michael Vetter
19c5925c37 editor: make editor configurable via /executable
`/executable set editor /full/path/to/edit`.

Regards https://github.com/profanity-im/profanity/issues/1521
2021-04-16 23:18:19 +02:00
Michael Vetter
1f4f912e78 editor: adapt help description 2021-04-16 23:04:13 +02:00
Michael Vetter
db2205d30c editor: Save temp files as .md
Probably many people render text in their head to markdown
automatically.
2021-04-16 22:18:01 +02:00
Michael Vetter
2f4289bb3e
Merge pull request #1485 from StefanKropp/feature/editor-command
Add basic functionality to launch external editor

Regards https://github.com/profanity-im/profanity/issues/1521
2021-04-16 19:27:07 +02:00
Michael Vetter
e1249d9bbb Editor: improve error messages 2021-04-16 19:14:40 +02:00
Michael Vetter
8be46422d2 editor: Use g_strdup_printf() instead of g_string_new() 2021-04-16 18:06:30 +02:00
Michael Vetter
880ce20018 Run clang-format on new editor code 2021-04-16 18:04:03 +02:00
Stefan
f5e1f9fa63 Editor: Fix redisplay 2021-04-16 18:04:03 +02:00
Stefan
ce508a826a Editor: Use _exit() instead of exit() 2021-04-16 18:04:03 +02:00
Stefan
9f32b2afb2 Editor: Using preferences compose.editor
compose.editor is the path to the executable ( default /usr/bin/vim )
2021-04-16 18:04:03 +02:00
Stefan
35b0b0f194 Editor command: filename / sensible-editor
* Generating a unique file name in tmp_dir folder
 * Changed exec of vim to exec of sensible-editor
 * Test file exists and create file with "private" rights
 * Send a preview of the message in the window
 * Delete temp file
2021-04-16 18:04:03 +02:00
Stefan
8be8f75b87 Add new editor command
Goal is to launch an external editor (eg vim) to edit the text there.
2021-04-16 18:03:58 +02:00
Michael Vetter
791b13cb9a Mention clipboard in version output 2021-04-16 13:17:04 +02:00
Michael Vetter
8c50b63e56 Goodbye beautiful IDs
It was a great ride!

IDs look instead of
`TE5BTDc2ZTc3YTMwZGU3MDgzMzllOTliNGExNjVmMjZkMTY1ZmUyZGEyNTUxMjVmODBkMmQzOGMxYWI2ZjAxNzdiM2Q=`
more like `7HcnNSoO1MVvb0p9a9e293152922853e910b8b1a65bb26e225a0568` now.

Regards https://github.com/profanity-im/profanity/issues/1520

We still has our identifier into it to filter MUC reflected messages.

profident maybe should be changed to be longer or be generated upon each
start.
2021-04-14 22:47:58 +02:00
Michael Vetter
558d672733
Merge pull request #1515 from mwuttke97/fix_omemo_empty_devlist
[OMEMO] Fix sending messages
2021-04-08 10:20:42 +02:00
Maximilian Wuttke
025c2fb1e0 Msg sending: don't write to chatwin nor to log if sending failed
Currently, only `chat_log_omemo_msg_out` can fail (i.e. return `NULL`
instead of a stanza id). In this case, the message is neither printed to
the chat window nor added to the log (since it wasn't sent).
2021-04-08 00:30:03 +02:00
Maximilian Wuttke
e8664e2730 OMEMO: Fail if message keys couldn't be encrypted for any recipient device
If the message (key) can't be encrypted for any device, sending the
message is refused and an informative error message is presented to the
user.

Also, don't encrypt for the same device, since the OMEMO XEP disallows
this.
2021-04-08 00:29:58 +02:00
Maximilian Wuttke
9e0d0ed466 OMEMO: Remove duplicate session initalisation
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.
2021-04-08 00:23:07 +02:00
Michael Vetter
1ec606540e Get rid of asprintf and _GNU_SOURCE define
_GNU_SOURCE was even in some files where it was not needed at all
(http*).

Let's replace asprintf() with g_strdup_printf().
2021-03-30 17:38:13 +02:00
Michael Vetter
3c1e4bac3a Fix segfault in cmd_autoaway()
Two mistakes were here:
* `/autoaway time away` without a time argument segfaulted
* `/autoaway message away` without a mesage set to (null). We have
  `/autoaway message off to set it off.

Also use g_strcmp0() instead of strcmp().
2021-03-29 10:48:42 +02:00
Michael Vetter
a09d49d884
Merge pull request #1514 from profanity-im/fix/1512-rpi
Include config.h in omemo files
2021-03-26 20:07:18 +01:00