1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
Commit Graph

7398 Commits

Author SHA1 Message Date
Michael Vetter
abaf96dcef Fix memleak in stanza_create_caps_query_element
Got introduced with 5d3c8ce7c.
2023-04-18 20:26:24 +02:00
Michael Vetter
96f9a84f01
Merge pull request #1835 from H3rnand3zzz/fix/message-logging
Fix crash, add consistency to logging
2023-04-18 18:34:20 +02:00
John Hernandez
96ddb2399e Add logging consistency
Since MUC private messages are not logged by design,
part where this logging happening is removed to add consistency.

Add explanation in comment.
2023-04-18 18:19:47 +02:00
John Hernandez
5a1f2dedd3 Fix /log level crash
Fix crash caused by `/log level` command.

Minor refactoring of command function.
2023-04-18 18:16:57 +02:00
Michael Vetter
4933d4e4f3
Merge pull request #1827 from H3rnand3zzz/feature/sessions-alarm
New Feature: Session Alarm
2023-04-18 14:43:01 +02:00
John Hernandez
bed5c02c0d Add vscode support to .gitignore 2023-04-18 14:28:30 +02:00
John Hernandez
07cc19ce10 Add sessions_alarm
Introduce new feature: sessions_alarm.

Added new account setting: max_connections. On exceeding this number,
user will get an alert. If number is less than 1, no alert will happen.

Tests altered to fit new feature.
2023-04-18 14:28:20 +02:00
Michael Vetter
f51dc019bc
Merge pull request #1829 from H3rnand3zzz/fix/readline-history
Don't add the same command twice to history
2023-04-18 09:38:12 +02:00
John Hernandez
59b99fece8 Don't add the same command twice to history
Expected behaviour
When you type
/command
/command
it should be just 1 entry in the history.

Behaviour
All the entries were saved.

Behaviour is changed by introducing check. Before adding to history,
entry now is compared to the last history entry.
2023-04-17 11:29:47 +02:00
Michael Vetter
1b679498b6 doscs: Add terminology section to man page
Let's just define some basic terminology.

In many sections of the /help we actually use these terms.
This should help new users understand what they mean.
2023-04-17 11:25:44 +02:00
Michael Vetter
46cba28292
Merge pull request #1831 from profanity-im/man_enc
Add encryption section to man page
2023-04-17 11:02:44 +02:00
Michael Vetter
ee6bf23b8d Add encryption section to man page
The goal should be that users can make a more informed decision about
which encryption they actually want to use.

We can also use this to document usage details of implementation quirks,
if any.
2023-04-17 10:59:41 +02:00
Michael Vetter
f239f5a071
Merge pull request #1830 from profanity-im/feat/codspellci
Add spellcheck to CI
2023-04-15 12:18:41 +02:00
Michael Vetter
181772bd5c Add spellcheck to CI 2023-04-15 12:03:57 +02:00
Michael Vetter
951df64a43 docs: Add info about different clang-format versions
Make this clear to new users. Since sjaeckel had reservations
on https://github.com/profanity-im/profanity/pull/1828.
2023-04-15 11:50:57 +02:00
Michael Vetter
6eacfcb96e
Merge pull request #1828 from profanity-im/newclang
Use GH action for code style check
2023-04-14 22:01:28 +02:00
Michael Vetter
a1814fd3cb Add another formatting commit to git blame ignore 2023-04-14 21:46:27 +02:00
Michael Vetter
d17bcf619c Format code with clang-format 16 2023-04-14 21:45:21 +02:00
Michael Vetter
663c773bff Switch to clang-format check action
Instead of running clang-format outselves on the old Ubuntu version.
This let's us easily configure which version of clang-format we want to
execute.

Used action:
https://github.com/marketplace/actions/clang-format-check

Properly fix:
https://github.com/profanity-im/profanity/pull/1774
2023-04-14 21:43:31 +02:00
Michael Vetter
9bce23e075 docs: Fix formatting in SECURITY.md 2023-04-14 13:16:32 +02:00
Michael Vetter
a99a4fad3e
Merge pull request #1823 from H3rnand3zzz/fix/msg-crash
Fix memory corruption crash
2023-04-14 13:14:01 +02:00
Michael Vetter
ebec68821f
Merge pull request #1826 from H3rnand3zzz/feature/roster-nickname-remove
Add nickname support for `/roster remove`
2023-04-14 13:13:18 +02:00
John Hernandez
899b26b3bc Cleanup p_ox_gpg_decrypt
In OX implementation gpgme's buffer remains untouched, thus not leading to the crash.

But code can be shorter and more concise.
2023-04-13 17:17:25 +02:00
John Hernandez
5e8f1f9c85 Fix memory corruption crash
Under certain circumstances setting plain_str[len] to 0 might lead to crash
and it does not follow the best practices as well.

This change allows better handling of buffer copying and prevents crash.
2023-04-13 17:16:55 +02:00
John Hernandez
5b8b9074a2 Add nickname support for /roster remove
Add support of name/nickname instead of only JID for `/roster remove` command.

Add tests for it as well.
2023-04-13 16:41:21 +02:00
Michael Vetter
766dc76e33 docs: add SECURITY.md 2023-04-13 15:51:22 +02:00
Michael Vetter
ef3810638f iq: initialize os and os_txt
Let's set this to NULL.

Someone was using `picaur` and got an error about potential
uninitialization. Even though the code is fine let's set this to NULL to
make the compiler happy.

The strange thing was that building manually on the same system worked.

Related to 2e43b0ae62.
2023-04-11 20:19:49 +02:00
Michael Vetter
93fa8467ef
Merge pull request #1822 from H3rnand3zzz/fix/iq-os
Hotfix stanza release
2023-04-11 11:26:45 +02:00
John Hernandez
2e43b0ae62 Fix releases of os and os_txt stanzas
If custom client is not set and include_os is true,
stanzas might be released without initializiting.

This commit fixes it by introducing an additional check
on usage of custom client.

Related to commit e52ca2fbaa
2023-04-10 21:26:10 +02:00
Michael Vetter
4f94898611 Add test/valgrind section to PR template 2023-04-10 20:47:55 +02:00
Michael Vetter
e3820d7037 Add limitation info about /statusbar chat user|jid
While testing https://github.com/profanity-im/profanity/pull/1817
we found that:

```
/statusbar show name (I have this off by default
/msg someone where I chose someone in my roster that has a nick assigned
/statusbar chat jid
```

Will only take effect upon creation or redraw of that tab.
Reason is that we do this in create_tab to limit building this
dynamically.

Let's leave it like it is but add a note to users.
Not worth build that string all the time.
2023-04-10 20:22:40 +02:00
Michael Vetter
e3beac414e
Merge pull request #1817 from H3rnand3zzz/feature/full-jid
JID Display in Titlebar and Fix
2023-04-10 20:21:06 +02:00
John Hernandez
7d290b04d5 Fixes Statusbar tabs and Cleanup
- Fixes statusbar tabs.
Bug: Statusbar used nickname if it was set in roster,
irrelevant to /statusbar chat setting.
Expected behaviour would be using this setting set as "user" to show nickname,
and to show jid with "jid" setting.
Other solution is to give a user control over it with another settings.
- _status_bar_draw_maintext cleaned up, no changes to behaviour
2023-04-10 16:28:44 +02:00
John Hernandez
0740d692dc Improve titlebar flexibility
Before this change, only nickname or JID (if no nickname set) is shown in the titlebar.
Change allows to alter nickname/JID preference
using already implemented /titlebar show jid|name setting.
If both are set to "show", then it is displayed in "nickname <JID>" format.
2023-04-10 11:04:20 +02:00
Michael Vetter
54cf152130 contributing: add note about testing 2023-04-09 21:25:28 +02:00
Michael Vetter
64cb52bef5 Rewrite description for clientid 2023-04-09 18:26:40 +02:00
Michael Vetter
e52ca2fbaa
Merge pull request #1815 from H3rnand3zzz/feature/the-client-switcher
Feature: Allow setting client identification name/version manually
2023-04-09 18:24:23 +02:00
John Hernandez
5d3c8ce7c1 Allow setting client identification name/version manually
Add changes allowing user to switch client name and version.

Useful for enhancing user privacy.

Minor cleanup.
2023-04-09 14:17:01 +02:00
Michael Vetter
19921f61c1
Merge pull request #1821 from mdosch/use-proper-ellipsis-char
User proper ellipsis char
2023-04-09 14:10:32 +02:00
Martin Dosch
e1ffc64a65 User proper ellipsis char
As stated in
https://github.com/profanity-im/profanity/pull/1820#issuecomment-1498083383
profanity uses "..." (three dots) in a lot of places instead the proper
ellipsis char "…".
2023-04-09 12:19:18 +02:00
Michael Vetter
ac581c29bf
Merge pull request #1813 from profanity-im/tabmode-irssi
add `/statusbar tabmode actlist`
2023-04-08 18:50:50 +02:00
Steffen Jaeckel
0cf79848e9 add /statusbar tabmode actlist
The existing way how active tabs are displayed didn't allow showing more
than 10 tabs. This patch adds a mode where the statusbar shows a
comma-separated list of tabs which were active since the last time viewed.
This view is inspired by how `irssi` shows the active tabs, therefore
it is also called `actlist`.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-04-08 18:38:36 +02:00
Michael Vetter
5f078f95f2
Merge pull request #1814 from profanity-im/improvements
Improvements and bugfixes
2023-04-04 13:32:27 +02:00
Steffen Jaeckel
7271898541 fix display of a "list type" in a form if there's no value assigned yet
It is possible, that a server sends a form with a field as follows, which
has no (default) value assigned.

```
<field label="foo" type="list-single" var="bar">
  <option label="a"><value>a</value></option>
  <option label="b"><value>b</value></option>
  <option label="c"><value>c</value></option>
</field>
```

This patch fixes profanity to show that list. Before this patch
profanity showed nothing.

I stumbled over this while running the `/room config` command inside
a newly created muc on the `sure.im` XMPP server.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-04-04 11:22:00 +02:00
Steffen Jaeckel
74415ae71d refactor into array of a struct
...instead of having two separate arrays.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-04-04 10:58:52 +02:00
Steffen Jaeckel
0242576d7c only create hashtable once
Before this change the same hashtable was re-created each time one used the
auto-completion feature.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-04-04 10:58:52 +02:00
Steffen Jaeckel
af6f468cb7 fix memory leak
`found` was leaked before

This was somehow missed in e9aaba938b

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-04-04 10:58:52 +02:00
Michael Vetter
36fd4faa4f
Merge pull request #1811 from shahab-vahedi/batman-fix
Fix color name in batman theme
2023-04-03 23:31:48 +02:00
Shahab Vahedi
883469c549 themes/batman: Use "bold_black" iso "black_bold"
This makes all the related errors in the log files go away:
  ...
  prof: ERR: Color: bad color name black_bold_default
  prof: ERR: Unable to load colour theme
  ...

Fixes https://github.com/profanity-im/profanity/issues/1810
2023-04-03 21:47:24 +02:00
Michael Vetter
6b597f6608 Fix typos 2023-04-03 17:27:37 +02:00