1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

6650 Commits

Author SHA1 Message Date
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
Michael Vetter
dfae38c835
Merge pull request #1561 from CIacademic/master
Escape all parameters in SQL statements
2021-06-11 16:53:41 +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
27e598e957 gh: fix typo in issue template 2021-06-10 13:52:24 +02:00
Michael Vetter
c83f246a90
Merge pull request #1560 from profanity-im/feature/1525-jingle
XEP-0353: Display a notice when receiving a call
2021-06-10 13:50:18 +02:00
Michael Vetter
642fbf4118 gh: 50 issue feature request ban 2021-06-10 00:03:57 +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
343d970e3d
Merge pull request #1559 from profanity-im/feature/1558-bookmark
Add command to show single bookmark details
2021-06-09 16:19:45 +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
efcb0c31ea
Merge pull request #1557 from profanity-im/fix/1231-display
Fix wrong message display when mention is triggered
2021-06-08 22:14:06 +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
Michael Vetter
8ffb1bdd37
Merge pull request #1550 from DebXWoody/messagewithoutbody
Message received without body error log
2021-06-04 08:23:56 +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
78447927eb
Merge pull request #1549 from DebXWoody/bugfix/fix1530
Restart OMEMO Session after lost connection
2021-06-02 13:22:34 +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
Michael Vetter
45c930eaa5
Merge pull request #1548 from DebXWoody/bugfix/bugfix1538
OMEMO - Notify user when unable to publish own device list
2021-06-01 09:46:35 +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
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
6df062b542 Change ui_win_has_attention() logic 2021-05-31 09:51:23 +02:00
Michael Vetter
2dcbaf98c0 Change attention description 2021-05-31 09:46:12 +02:00
Michael Vetter
2bfe11ed82 Display attention hint in titlebar for mucs too
* Display the `[ATTENTION]` hint in the titlebar for both chatwins and
mucwins.
* Use THEME_TITLE_TEXT instead of THEME_TITLE_ENCRYPT
* Have separate function `_show_attention` and don't do it in unrelated
  `_show_privacy`.
2021-05-31 09:41:18 +02:00
Michael Vetter
9f174c53cf
Merge pull request #1546 from Mic92/editor
external editor: don't use absolute paths and allow path search
2021-05-31 09:10:15 +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
47e39a7975
Attention-flag: Fix next window 2021-05-29 22:01:44 +02:00
DebXWoody
b9af7152f9
attention-flag - unittest - stub_ui 2021-05-29 21:17:12 +02:00
DebXWoody
b0a89db1d6
Attention flag message ( enabled, disabled)
When the user enables or disabled the attention flag, a message will be
displayed in the chat window.
2021-05-29 20:44:17 +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
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