1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00
Commit Graph

7184 Commits

Author SHA1 Message Date
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
Michael Vetter
a086cfbc78
Merge pull request #1808 from MarcoPolo-PasTonMolo/fix/empty_window_after_reconnect
Fix empty window after reconnect
2023-04-03 17:16:47 +02:00
Michael Vetter
46c1262b91
Merge pull request #1809 from MarcoPolo-PasTonMolo/fix/no-ac-for-reconnect-now
Add autocomplete for the /reconnect command
2023-04-03 17:15:35 +02:00
Michael Vetter
2caae3ed99
Merge pull request #1807 from alexandre1985/fix/typos
Fix typos and add codespell configuration
2023-04-03 17:13:00 +02:00
Daniel Santos
c7f05c9ebf Fix typos and update codespell configuration
* Fix typos.
 * Add words that are not typos to codespell's ignore words list and
 ignore regex.
 * Make codespell ignore URIs.
 * Make `make doublecheck` throw no error.

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2023-04-03 13:25:25 +01:00
MarcoPolo-PasTonMolo
24ba431ed7 Add autocomplete for the /reconnect command
After typing `/reconnect ` and pressing tab nothing appeared where in
reality, it should have been autocompleted to `/reconnect now`
2023-04-02 22:06:17 +03:00
MarcoPolo-PasTonMolo
ce688f6737 Fix empty window after reconnect
Sometimes after a reconnect the current window would get cleared. This
was a deliberate change to fix the profanity window looking all garbled
up after providing the passphrase for a gpg key using pinentry-curses.

Fixes https://github.com/profanity-im/profanity/issues/1556
2023-04-02 21:53:12 +03:00
Michael Vetter
f2c83fa8ce
Merge pull request #1801 from alexandre1985/editor-with-arguments
Editor executable support flags
2023-03-31 16:01:22 +02:00
Daniel Santos
12fda4226b Add editor executable to CMD_SYN
* Add missing text of how to set editor in CMD_SYN

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2023-03-31 13:55:58 +01:00
Michael Vetter
a0d5c07a4c Fix headings in contributing.md 2023-03-31 14:14:52 +02:00
Michael Vetter
2e1d5d03dc
Merge pull request #1802 from H3rnand3zzz/pgp-fix
Security fix of OTR, PGP and other
2023-03-31 13:21:16 +02:00
John Hernandez
407905cfc5 Fix OTR
Fix OTR: carbon in stanza breaks OTR and prevents it from starting and working properly.
2023-03-31 12:30:51 +02:00
John Hernandez
99c9f150f6 Fix PGP
Fix of PGP and potentially other encryption methods by calling correct function that would initiate them in case if someone writes.
2023-03-31 12:30:51 +02:00
Daniel Santos
007f623ad8 Editor executable support flags
* Make editor executable into a string to be able to support
   (multiple) flags.
 * Change /help executable to suit this new feature

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2023-03-30 21:44:26 +01:00
Michael Vetter
2093fe417f
Merge pull request #1800 from profanity-im/switch
Improve some UI functions
2023-03-23 18:47:09 +01:00