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

4835 Commits

Author SHA1 Message Date
Michael Vetter
20e1f16b1f Fix segfault in /blocked with no args
Fix https://github.com/profanity-im/profanity/issues/1575
2021-07-06 10:21:26 +02:00
Michael Vetter
5022aeb337 Fix log rotation
Fix https://github.com/profanity-im/profanity/issues/1518
See
https://github.com/profanity-im/profanity/issues/1518#issuecomment-870581988
2021-07-05 11:52:06 +02:00
Michael Vetter
2cbea9daad cmd_blocked: Exit when wrong arguments 2021-07-02 08:36:51 +02:00
Thorben Günther
34b5e0f8c6
Initialize jid 2021-07-01 21:32:23 +02:00
Michael Vetter
e4a62f3958 XEP-0377: Fix arg parsing 2021-07-01 20:43:17 +02:00
Michael Vetter
07bb790565 XEP-0377: Add forgotten namespace 2021-07-01 19:31:55 +02:00
Michael Vetter
3a9cffe013
Merge pull request #1566 from DebXWoody/bugfixing/ox
Bugfixes for OX implementation
2021-07-01 18:26:06 +02:00
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
226cffe75b
Merge pull request #1569 from profanity-im/feature/1434-spam-reporting
Add XEP-0377: Spam Reporting
2021-07-01 17:04:04 +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
Thorben Günther
0fc3343d75
Restore last status string when connecting 2021-07-01 16:08:00 +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
aae252e1b5
Merge pull request #1529 from dustinlagoy/access-roster-from-plugins
Access roster from plugins
2021-07-01 09:41:07 +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
dc79c514be Fix /disco info contact address header
Only display server contact information heading when we have actual
addresses.
2021-06-30 13:58:28 +02:00
Michael Vetter
a46c4443e3 Fix segfault when aesgcm url isn't the expected size
Fixes the bug mentioned in
https://github.com/profanity-im/profanity/issues/1478#issuecomment-794161606

The rest of https://github.com/profanity-im/profanity/issues/1478 I
can't reproduce. Seems to work fine.
2021-06-30 12:27:11 +02:00
Michael Vetter
3d5e59895b Adjust contact addresses output to the rest of disco info
Format the output of cons_show_disco_contact_information() so that it matches cons_show_disco_info().
2021-06-30 11:30:02 +02:00
Michael Vetter
c847a8d662 command: Mention xep-0157 in /disco info 2021-06-30 11:24:38 +02:00
Michael Vetter
817a6bff54 XEP-0157: Print all available addresses 2021-06-30 11:23:22 +02:00
Michael Vetter
ef96bea82e XEP-0157: Print contact addresses 2021-06-30 10:45:59 +02:00
Michael Vetter
2f5aa124ca XEP-0157: Parse contact address stanza 2021-06-29 22:52:45 +02:00
DebXWoody
6173e015f5
OX bug fixing
* Don't decryption if there is no private key
 * Decryption error messages
2021-06-29 20:25:50 +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
DebXWoody
879a47c71b
OMEMO Logging 2021-06-28 20:02:22 +02:00
Michael Vetter
49a0d97a43
Merge pull request #1564 from profanity-im/fix/977
Disable notifications by default
2021-06-28 19:40:25 +02:00
Michael Vetter
6b9e998113
Merge pull request #1563 from profanity-im/fix/1518-logrot
Fix log rotation
2021-06-28 19:39:49 +02:00
Michael Vetter
7db8f6f5a4 Disable notifications by default
Since I didn't find a way to discover whether a notification server is
running I decided to disable them by default. So people without one will
not have such a bad lag due to timeout from libnotify.

Fix https://github.com/profanity-im/profanity/issues/977
2021-06-28 19:22:22 +02:00
Michael Vetter
482f8955d7 Fix log rotation
See https://github.com/profanity-im/profanity/issues/1518
It has a good explanation of what happened:

```
Apparently, the _rotate_log_file function tried to extract user-provided
name from currently used mainlogfile and restart logging to the same
place after rotation, but currently this is interpreted as a full path
instead. As I understand, the log rotation is no longer done with
user-provided paths at all so this should be simply skipped altogether
now as passing any non-NULL value is interpreted as user-provided.
Replacing start with NULL appears to fix it for me.
```

In log_msg() we only rotate the log if not user_provided_log.

https://github.com/profanity-im/profanity/pull/1455 changed the
behaviour from user defined filename in the log dir to using full path.
2021-06-28 17:41:48 +02:00
CIacademic
e4d23d9364 Escape all parameters in SQL statements
Some more parameters might contain quotes, so escape all of them
with %q by using sqlite3_mprintf.
2021-06-11 14:16:43 +00:00
Michael Vetter
a4230603d3 Fix executable example
Changed in a5a0dd6c91
2021-06-10 17:28:57 +02:00
Michael Vetter
fc593ef90e Print editor command in /executable overview 2021-06-10 17:28:29 +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
46cd09cce4 XEP-0353: Display a notice when receiving a call
Display a notice in the console when someone tries to call us.

Implement https://github.com/profanity-im/profanity/issues/1525
2021-06-09 20:14:57 +02:00
Michael Vetter
86aec9d068 win unread: fix window test
Fix https://github.com/profanity-im/profanity/issues/1554
2021-06-09 18:41:56 +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
d7adec69ce
Merge pull request #1553 from DebXWoody/bugfix/fix1552
OMEMO: Separate handling of device list

Two changes: 
* First register the handler before sending the request
* Don't add own jid to handler
2021-06-09 10:08:21 +02:00
Michael Vetter
f20f629bb4 Fix multiple mentions in one line
`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.
2021-06-08 20:34:24 +02:00
Michael Vetter
6bc440c6f7 Use utf-8 safe functions in _mucwin_print_mention()
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
2021-06-08 19:42:41 +02:00
DebXWoody
8fe95399a1
OMEMO: Separate handling of device list
In profanity are two handlers for device list:

 * _handle_own_device_list
 * _handle_device_list_start_session

I seems both handler will start a session via
omemo_start_device_session_handle_bundle

_handle_own_device_list will also make sure, that the own device is withing the
omemo device list. If we add the _handle_device_list_start_session into the
hashmap, we are not going the republish ourself, in case we clean-up the device
list from another client.

This will maybe fix #1552

99 Little Bugs in my Code.
Take one down.
Patch it around.
113 Bugs in my Code
2021-06-05 19:12:42 +02:00
DebXWoody
183eeca632
Message received without body error log
This is not an error, the message has no body because of
XEP-0085: Chat State Notifications.

Changed log level from error to info.
2021-06-03 19:55:13 +02:00
Michael Vetter
e1fbe3be90
Merge pull request #1542 from DebXWoody/bugfix/fix1541
OMEMO: Don't encrypt to yourself (MUC)
2021-06-03 15:43:56 +02:00
Michael Vetter
e9ef3cf1d2 http upload: use correct content type
This bug was introduced in 1ec606540e when
`g_strdup_printf` was used instead of `asprintf`.

Problem discoverd by raspeguy.
Mistake discovered by optmzr and Martin.

Thanks to everybody involved!
2021-06-02 15:29:32 +02:00
Michael Vetter
c815547cba Change restarted omemo text 2021-06-02 13:10:42 +02:00
DebXWoody
b235eb2351
Restart OMEMO Session after lost connection
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
2021-06-02 06:54:41 +02:00
DebXWoody
41913a0aea OMEMO - Unable to publish own device list
If we are not able to publish our own device list, we just ignored it.
This commit will show at least an error message and informs the user that this
device is currently not in the list of devices.

See Issue: #1538

Next task will be to handle the <precondition-not-met/> conflict properly.
2021-06-01 09:44:48 +02:00