1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-15 19:38:07 -04:00
Commit Graph

1502 Commits

Author SHA1 Message Date
DebXWoody
d01ba72535
OX bug fix
* Help / message description
 * C-Code format
2021-07-01 18:08:40 +02:00
Michael Vetter
06482fdaef Add option to only allow messages from jids in roster
`/silence on` will throw away all messages (type: chat, normal) that
come from jids that are not in the roster.

Implement https://github.com/profanity-im/profanity/issues/955
2021-07-01 18:02:03 +02:00
Michael Vetter
1d845c9ffb Reorder /blocked commands
Instead of `/blocked add [<jid>] [report-abuse|report-spam [<message>]`
have:
* /blocked add [<jid>] [<message>] (like before)
* /blocked report-abuse [<jid>] [<message>]
* /blocked report-spam [<jid>] [<message>]
2021-07-01 17:02:39 +02:00
Michael Vetter
7f737a3b47 Mention feature details when not supported
So that we will get aware of a version mismatch.
2021-07-01 10:36:52 +02:00
Michael Vetter
31ebd6ab1c Add XEP-0377: Spam Reporting
Report and block:
`/blocked add someone@domain.org report-abuse This is not nice`
`/blocked add someone@domain.org report-spam This is not nice`

Regular block:
`/blocked add someone@domain.org`

Implement https://github.com/profanity-im/profanity/issues/1434
2021-07-01 00:14:32 +02:00
Michael Vetter
c847a8d662 command: Mention xep-0157 in /disco info 2021-06-30 11:24:38 +02:00
DebXWoody
2a011e69ac
Bugfixes for OX implementation
* autocomplete for /ox discover
 * fixed help description
 * Implemented /ox char command
 * Validated KeyID length
2021-06-28 21:28:58 +02:00
Michael Vetter
a4230603d3 Fix executable example
Changed in a5a0dd6c91
2021-06-10 17:28:57 +02:00
Michael Vetter
a4deec8b8d editor: dont print preview in window
See https://github.com/profanity-im/profanity/issues/1521#issue-860017824
2021-06-10 16:57:18 +02:00
Michael Vetter
158cfaface editor: dont check whether compose file exists
No need to check anymore since we are now saving per account.
Like this we also could reopen the same file again.
2021-06-10 16:55:17 +02:00
Michael Vetter
b7914c4c6a editor: use status to check for being online 2021-06-10 16:54:25 +02:00
Michael Vetter
242381cfd0 editor: Use datadir instead of tmp dir
See
https://github.com/profanity-im/profanity/issues/1521#issue-860017824
2021-06-10 16:51:28 +02:00
Michael Vetter
d80d3dd5aa Add editor hint
See
https://github.com/profanity-im/profanity/issues/1521#issuecomment-854110973
2021-06-10 16:30:39 +02:00
Michael Vetter
8ef35290bd Add command to show single bookmark details
`/bookmark list` lists all bookmarks with its details.
`/bookmark list <jid>` shows the details of a single bookmark.

Implement https://github.com/profanity-im/profanity/issues/1558
2021-06-09 15:53:21 +02:00
Michael Vetter
956fd547c1
Merge pull request #1543 from DebXWoody/feature/attention-flag
Feature - attention flag
2021-05-31 10:03:22 +02:00
Michael Vetter
2dcbaf98c0 Change attention description 2021-05-31 09:46:12 +02:00
Jörg Thalheim
a5a0dd6c91
external editor: don't use absolute paths and allow path search 2021-05-30 23:14:05 +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
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
Raf Czlonka
9170a088cd Fix spelling of "persistent(ly)" 2021-05-23 14:15:16 +01: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
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
Michael Vetter
c106187db7 command: Fix serversoftware examples 2021-04-18 16:08:50 +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
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
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
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
057c9ad776 Add config.h in files were it was missing
Related to https://github.com/profanity-im/profanity/issues/1512
2021-03-26 19:54:22 +01:00
Michael Vetter
fde0a0d1c6 Add support to register with a room
`/affiliation register` can now be used to register a nickname with a
MUC.

Tested with a server without forms. Couldn't find a server which
supports forms yet.

Implements https://github.com/profanity-im/profanity/issues/1210
2021-03-25 11:05:58 +01:00
Michael Vetter
18172f5260
Merge pull request #1511 from mwuttke97/doc_bookmark_join
Command doc: Improve description and examples of `/bookmark` and `/join`
2021-03-24 14:31:22 +01:00
Maximilian Wuttke
b8f3e8e0ac Command doc: Improve description and examples of /bookmark and /join 2021-03-21 10:59:06 +01:00
Thorben Günther
ec6f9df486
MUC: Add voice request
closes https://github.com/profanity-im/profanity/issues/1211
2021-03-12 14:57:00 +01:00
Thorben Günther
dbd8657759
Completion: Split up role and affiliation completion
Needed for affiliation request
2021-03-12 14:49:20 +01:00
Michael Vetter
cb0adae63a Dont build paths manually in cmd_funcs.c
Some time ago we introduced get_expanded_path().
No need to build paths manually anymore to get ~.
2021-03-12 10:29:06 +01:00
Thorben Günther
b0aea2bcff
Add command to change password of logged in user 2021-03-11 17:42:53 +01:00
Thorben Günther
71236a0d5a
Update ui_ask_password to support confirmation
Just prints a different string to console.
Useful for changing passwords or account registration.
2021-03-11 14:40:17 +01:00
Thorben Günther
2dd909babb
Cmd definitions: Add offline option to occupants 2021-03-08 19:15:24 +01:00
Thorben Günther
f1780f0017
MUC: Show offline members in sidebar 2021-03-08 14:34:59 +01:00
Michael Vetter
79fbd403a7 Correct command synopsis for mam 2021-02-09 11:31:08 +01:00
Michael Vetter
44fc3f0506 Add /mam command
Regards https://github.com/profanity-im/profanity/issues/660
2021-01-28 15:11:50 +01:00
Michael Vetter
6a17e9d50e Dont reload theme when disconnecting on purpose
I don't see why would need to.
Also this only happens upon `/disconnect` not on a network outage or
server related disconnect.

Fixes https://github.com/profanity-im/profanity/issues/1472
2021-01-22 13:17:49 +01:00
Michael Vetter
1038b97a7d Fix old chlog reference in help
Fixes https://github.com/profanity-im/profanity/issues/1470
2021-01-17 11:31:05 +01:00
William Wennerström
01e8f01ed3
Add /executable (urlsave|urlopen) migrations 2020-12-18 16:05:11 +01:00
Michael Vetter
0277ffe6ae Only rotate logs if user didn't specify a log file 2020-12-11 11:33:34 +01:00
Michael Vetter
47a447bf73 Shared log file needs a restart
Tell user about this change.
2020-12-11 11:17:44 +01:00
William Wennerström
e70c64b74a
Create download directory under XDG data path
* If the downloads directory does not exist, create it.
 * Change some cons_show to cons_show_error (because they log errors).
2020-12-10 19:04:32 +01:00
Michael Vetter
a94378f206 Fix various typos 2020-12-10 09:24:32 +01:00
William Wennerström
a1486012d2
Fix build failure (unused variable) 2020-12-09 19:37:35 +01:00
William Wennerström
00dbc1ba7c
Cast chat/muc window to correct type and refactor cmd_sendfile
Fixes #1449
2020-12-09 19:02:37 +01:00
Michael Vetter
55f09b6152 Use get_expanded_path() in cmd_senfile() 2020-12-09 08:44:44 +01:00
Michael Vetter
7a319df6c8
Merge pull request #1375 from wstrm/feature/omemo-sendfile
Send and retrieve encrypted files when using OMEMO
2020-12-09 08:09:09 +01:00
William Wennerström
d7848e38bc
Remove scheme and filetype matching for url (save|open) 2020-12-08 20:01:17 +01:00
Michael Vetter
1bbdaec8e7 Print man page arguments bold 2020-12-07 17:25:22 +01:00
Michael Vetter
377a7b8e83 Generate date for manpage 2020-12-07 16:58:09 +01:00
Michael Vetter
c833bd7fea Break lines differently in example and synopsis section 2020-12-07 16:45:17 +01:00
Michael Vetter
b1d0d6d0c3 man: formate arguments properly 2020-12-07 16:38:29 +01:00
William Wennerström
332dc87ca5
Fix wrong order of arguments for _url_http_method 2020-12-07 16:38:05 +01:00
William Wennerström
5c5b4d7025
Remove cmd_tiny, empty files and link nonce with IV 2020-12-07 16:30:03 +01:00
William Wennerström
867d895469
Add tests for format_call_external_argv 2020-12-07 16:16:15 +01:00
William Wennerström
4a1c118b8b
Fix bad order of parameters for url save 2020-12-07 15:15:06 +01:00
William Wennerström
ac03037847
Rework url to filename 2020-12-06 17:02:09 +01:00
Michael Vetter
5e99a791e6 Create cmd to generate man pages for prof commands
`profanity mangen` will create for each command (`/account`, `/roster`)
an own manpage (`profanity-account.1`, `profanity-roster.1`)

See https://github.com/profanity-im/profanity/issues/1444

Needs some polishing formatting wise.
2020-12-04 17:29:31 +01:00
William Wennerström
1d2c0a8836
Move unique_filename_from_url functions to common 2020-12-04 16:13:13 +01:00
William Wennerström
3a6597ee29
Refactor for threaded external executable for built-in download methods 2020-12-03 16:54:06 +01:00
William Wennerström
be62b446f7
Add stubs 2020-11-16 21:58:10 +01:00
William Wennerström
ab83afe21b
Switch to g_strerror 2020-11-16 21:58:09 +01:00
William Wennerström
62cbad1c6e
Add I/O error handling and use filenames instead of file descriptors 2020-11-16 21:58:09 +01:00
William Wennerström
73f313b921
Refactor OMEMO download into AESGCMDownload tool 2020-11-16 21:58:09 +01:00
William Wennerström
fb002a59b6
Use fallback method when /executable urlsave is unset 2020-11-16 21:58:09 +01:00
William Wennerström
4711fc62a3
Run make format on rebase 2020-11-16 21:58:09 +01:00
William Wennerström
a0cf0844ab
Remove unsafe Conent-Disposition inferring 2020-11-16 21:58:09 +01:00
William Wennerström
eebf54c859
Infer filename from content-disposition or URL
The Content-Disposition inferring is probably a bad idea security wise,
so I am going to remove it.
2020-11-16 21:58:09 +01:00
William Wennerström
9499df6585
Add http_download tool 2020-11-16 21:58:09 +01:00
William Wennerström
362c6973de
Wording 2020-11-16 21:58:08 +01:00
William Wennerström
04bfa23ead
Remove temporary ciphertext file when finished 2020-11-16 21:58:08 +01:00
William Wennerström
9d58472c8c
Remove /omemo sendfile 2020-11-16 21:58:08 +01:00
William Wennerström
f4ab1ca9e7
Move file encryption function to public header 2020-11-16 21:58:08 +01:00
William Wennerström
e98644f631
Add guards for OMEMO 2020-11-16 21:58:08 +01:00
William Wennerström
fc6136ddf0
Remove unused #define's and move URL scheme define to omemo/crypto.h 2020-11-16 21:58:08 +01:00
William Wennerström
d5b1dc0eb6
Move setup for AESGCM to omemo/crypto 2020-11-16 21:58:08 +01:00
William Wennerström
e9d5875782
Reformat HTTP get URL to AESGCM scheme 2020-11-16 21:58:08 +01:00
William Wennerström
39c3290613
Refactor to use file stream 2020-11-16 21:58:08 +01:00
William Wennerström
3370418d71
Initial /sendfile OMEMO encryption 2020-11-16 21:58:07 +01:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00