Michael Vetter
69301503ce
Add missing space to description
2024-09-19 08:34:21 +02:00
Michael Vetter
996a1fdf35
Fix build on some compilers regardind switch statement
...
Fix the famous `error: a label can only be part of a statement and a
declaration is not a statement`.
2024-06-20 18:04:12 +02:00
Michael Vetter
f147a5ca27
Change default download location
...
`/url save $someurl` will now download to
`~/.local/share/profanity/downloads/from_jid/date/filename` instead of
`~/.local/share/profanity/downloads`.
Like this the downloaded files should be better ordered.
This will only happen for MUC and 1:1 chat windows.
Private windows might have only a nick or jid. Lets not distinguish
between those two ways. And since the nick option is unreliable to be
the same person lets just put them in the general downloads folder.
As is done with downloads from all other windows as well.
I also had the idea to make this configurable but this suits my needs
and time limits right now.
2024-06-20 13:35:14 +02:00
Michael Vetter
5765edbe1b
Reset autoconnect account when the account gets removed
...
When a user added an account, set it as autoconnect and then removed
that account. It still was set as the autoconnect account.
```
/account add test
/autoconnect set test
/account remove test
/save
/quit
Start profanity
```
Fix https://github.com/profanity-im/profanity/issues/1976
2024-06-20 11:04:20 +02:00
Michael Vetter
87935b744d
Merge pull request #1979 from profanity-im/fix/leaks
...
Fix memleaks
2024-06-20 10:51:12 +02:00
Steffen Jaeckel
848acdd1fa
Improve const correctness
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2024-06-19 16:01:46 +02:00
Michael Vetter
b04650fb1c
Fix memleak in cmd_omemo_gen()
2024-06-19 11:40:23 +02:00
Michael Vetter
8a62d8e88b
Fix typo in OMEMO message
2024-06-19 11:37:34 +02:00
Michael Vetter
cfd4207d93
Merge pull request #1973 from profanity-im/fix/omemo-muc-twice
...
Check whether we are already in an omemo session for MUCs as well
2024-06-14 13:51:56 +02:00
Michael Vetter
1dd65bca6b
Check whether we are already in an omemo session for MUCs as well
...
We do this for regular chatwins already.
2024-06-02 19:07:58 +02:00
Michael Vetter
694680d69e
Remove subscription when reporting spam/abuse
...
When users receive a message and a subscription request from a new
contact, and they use `/blocked report-abse JID` or `/blocked
report-spam JID` they most likely want the subscription request to
vanish as well.
According to mdosch Conversations is behaving like this too.
Fix: https://github.com/profanity-im/profanity/issues/1970
2024-06-02 18:48:39 +02:00
ike08
23fa4750ff
Fix unable to download item twice
...
## Summary
Partial fix for https://github.com/profanity-im/profanity/issues/1939
> When doing the same in an unencrypted (no e2ee) chat there is no Downloading… message at all but the file is downloaded.
Download a file twice with `/url save`, the second download will not print download progress to the window.
The cause is `HTTPDownload`'s `silent` variable is not initialized; so, `silent` points to a second-hand stack memory address with old data. `silent` references data, so the `if` statement will fail in **src/tools/http_download.c:206** and download progress will not print to the window.
The fix is to initialize `silent` in both encrypted and unencrypted file download scenarios.
## Testing
Valgrind: Yes
- `/url save` without OMEMO
**SUCCESS**: Try three times with the same URL and download status will display every time.
- `/url save` with OMEMO
**SUCCESS**: Try three times with the same URL and download status will display every time.
- `/plugins install https://raw.githubusercontent.com/profanity-im/profanity-plugins/master/stable/sounds.py `
**SUCCESS**: Try once and download progress is hidden.
2024-02-28 07:23:59 -07:00
Michael Vetter
569e37f018
Update copyright to 2024
2024-01-22 16:03:48 +01:00
Steffen Jaeckel
3c939264b3
Less GString usage
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:27:11 +01:00
Steffen Jaeckel
b4c088232e
Improve const correctness
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:27:09 +01:00
Steffen Jaeckel
bac24601da
Introduce equals_our_barejid()
...
Instead of always repeating the same pattern, introduce a helper function.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:27:02 +01:00
Steffen Jaeckel
847a86de50
add connection_get_jid()
...
Use a singleton `Jid` inside the connection instead of always re-creating
a `Jid` from the same string.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:26:21 +01:00
Michael Vetter
bd0aa3eb85
Merge pull request #1824 from H3rnand3zzz/feature/mouse-scroll
...
Smooth scrolling support (+mouse wheel scrolling in some terminals)
2023-12-05 12:25:41 +01:00
John Hernandez
23692fedff
Add ALT
+UP
/DOWN
/mouse wheel
scroll support
...
Before the change, the only way to scroll was usage of page up/down,
it allowed to scroll only by skipping pages, which was not smooth.
2023-11-28 15:04:53 +01:00
John Hernandez
917558dc87
Separate new tabmode in a setting
...
Return static tabmode as default,
separate previous change in `dynamic` mode.
Despite usefulness of the solution,
it was not approved to be a new default.
Vote (link below) amongst users to change default
has shown inconclusive result and it was not representative,
as it had low number of participants.
https://github.com/profanity-im/profanity/pull/1912#issuecomment-1816232546
2023-11-20 15:03:59 +01:00
Michael Vetter
62e1de0f51
Merge pull request #1931 from H3rnand3zzz/feature/redraw-command
...
Introduce `/redraw` command
2023-11-14 14:02:47 +01:00
John Hernandez
a1ff88caae
Introduce /redraw
command
...
`/redraw` command allows resolve problem for usual users,
as well as developers.
Incredibly useful when debugging with something that
can trash out the output, like GDB.
Not to mention many asynchronous commands that can break the UI
at any point.
2023-11-14 13:32:37 +01:00
John Hernandez
1c02239ef6
Fix unintended exits on some commands
...
On some commands execution (like `/privacy logging X`
where X is any symbol/group of symbols)
FALSE is being returned.
Which main cycle understands as a signal to exit profanity.
The mistake is common since returns are often used by
developers to communicate success status.
First reported by @doctor in the Profanity MUC,
as exit on `/logging group color` command.
2023-11-11 13:58:47 +01:00
Michael Vetter
bba8278bb7
Fix passing of wrong parameter to cmd executable template function
...
`/executable vcard_photo test`
Printed
`Invalid usage, see '/help card_photo' for details.`
So it used the subcommand instead of the command and lost one of the
letters as well.
This mistake got introduced in 60c197487
.
Where we added helper functions for the various `/executable` functions.
Discovered by @H3rnand3zzz with correct solution.
Fix https://github.com/profanity-im/profanity/issues/1921
2023-11-10 23:01:27 +01:00
Steffen Jaeckel
4c26462827
Ensure instances of auto types are initialized
...
Follow-up of #1913
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-11-06 22:22:35 +01:00
Steffen Jaeckel
0449a42e5c
Fix /omemo fingerprint
crashing in a MUC
...
Reported by a user in the profanity MUC.
Fixup of e1d137f4e6
resp. #1863
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-11-06 19:29:25 +01:00
John Hernandez
8e40ca1470
Add unicode support for correction char
...
Commit to allow unicode support in omemo/pgp/otr chars misses
adding support to set correction character.
1f8b1eb740
Further fixing commit also misses adding support to set the unicode character,
it only adds ability to display unicode correction character in the settings.
5cf6ee15cf6ee1bc6d0b99b01891bc455a657bf022a72b0
2023-11-03 09:21:00 +01:00
John Hernandez
9ecade9919
Add params support for aliases
...
Before aliases used spaces in their name,
now the alias part is being read only before the first space,
thus allowing execution of complex command with aliases.
Example (with plugin):
`/alias add echo "/system exec echo"`
will allow execution of
`/echo test`
as opposed to prior state when the Profanity will
search for alias "echo tests" and output `Unknown command: /echo test`
Minor change: removed an example with invalid command (`/away`)
2023-10-20 10:42:37 +02:00
Michael Vetter
2ab9a306ab
Fix /plugins reload error message
...
`/plugins reload non-existent-plugin` printed:
```
Failed to reload plugin: non-existent-plugin, `:^C
```
There were two mistakes:
error_message instead of error_message->str was passed to cons_show().
And in case of failing to unload the plugin due to not finding it in the
hash table it didn't print an error.
This bug was introduced in cc697de05
.
2023-10-19 12:58:19 +02:00
Michael Vetter
c68e10c2c4
Merge pull request #1896 from H3rnand3zzz/fix/reconnect-crash
...
Fix 2 crashes on reconnection
2023-10-16 08:41:54 +02:00
John Hernandez
be42ffcee9
Fix crash on quick /reconnect now
usage (double free)
...
Check connection state before reconnection.
Fix #1894 https://github.com/profanity-im/profanity/issues/1894
2023-10-15 23:23:01 +02:00
John Hernandez
3c8b4acac4
Fix typos, correct grammar
2023-10-14 18:07:52 +02:00
IsaacM88
23c6936398
Improve MUC title behaviour for roster, statusbar, and titlebar
...
## Abstract
Continuation of https://github.com/profanity-im/profanity/pull/1881
Give all MUC title commands a consistent command structure and appearance.
- `/roster room use name|jid` and `/roster room show|hide server` are now `/roster room title bookmark|jid|localpart|name`
- `/statusbar room room|jid` is now `/statusbar room title bookmark|jid|localpart|name`
- `/statusbar show|hide jid` and `/statusbar show|hide name` are now `/titlebar room title bookmark|jid|localpart|name`
Fix both bugs mentioned in https://github.com/profanity-im/profanity/pull/1881
### src/ui/mucwin.c:mucwin_generate_title
Called by each command to generate a properly formatted title. It checks for "name" first because "name" is the default preference for each command. The last if-statement sets the title to "localpart" for special cases when the title should be "localpart" instead of the user-defined preference.
## Testing
### Preparation
Remove preferences that will interfere with testing.
```
sed -i "/roster.rooms.title=/d" profrc
sed -i "/statusbar.room.title=/d" profrc
sed -i "/titlebar.muc.title=/d" profrc
sed -i "/roster.rooms.use.name=/d" profrc
sed -i "/roster.rooms.server=/d" profrc
sed -i "/statusbar.room=/d" profrc
sed -i "/titlebar.muc.title.jid=/d" profrc
sed -i "/titlebar.muc.title.name=/d" profrc
sed -i "/roster.rooms.by=/d" profrc
```
### Command Definitions
| Test | Window |
| :--- | :--- |
| `/help roster` | - /roster room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the roster title for MUCs.<br>- *No /roster show\|hide server*<br>- *No /roster room use jid\|name* |
| `/help statusbar` | - /statusbar room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the title for MUC tabs.<br>- *No /statusbar room jid\|room* |
| `/help titlebar` | - /titlebar room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the MUC window title.<br>- *No /titlebar show\|hide jid\|name* |
### Autocomplete
| Test | Command line |
| :--- | :--- |
| `/roster room <TAB>` | Autocompletes `title` |
| `/roster room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/statusbar room <TAB>` | Autocompletes `title` |
| `/statusbar room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/titlebar room <TAB>` | Autocompletes `title` |
| `/titlebar room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/roster room <TAB>` | Does not autocomplete `use`, `show`, or `hide` |
| `/roster room use <TAB>` | Does not autocomplete `name` |
| `/roster room show <TAB>` | Does not autocomplete `server` |
| `/roster room hide <TAB>` | Does not autocomplete `server` |
| `/statusbar room <TAB>` | Does not autocomplete `jid` or `room` |
| `/titlebar show <TAB>` | Does not autocomplete `jid` or `name` |
| `/titlebar hide <TAB>` | Does not autocomplete `jid` or `name` |
### Set Preferences
| Test | Window | profrc |
| :--- | :--- | :--- |
| `/roster room title bookmark` | Roster MUCs will display 'bookmark' as their title. | roster.rooms.title=bookmark |
| `/roster room title jid` | Roster MUCs will display 'jid' as their title. | roster.rooms.title=jid |
| `/roster room title localpart` | Roster MUCs will display 'localpart' as their title. | roster.rooms.title=localpart |
| `/roster room title name` | Roster MUCs will display 'name' as their title. | roster.rooms.title=name |
| `/roster room title invalid` | Invalid usage, see '/help roster' for details. | |
| `/statusbar room title bookmark` | Displaying 'bookmark' as the title for MUC tabs. | statusbar.room.title=bookmark |
| `/statusbar room title jid` | Displaying 'jid' as the title for MUC tabs. | statusbar.room.title=jid |
| `/statusbar room title localpart` | Displaying 'localpart' as the title for MUC tabs. | statusbar.room.title=localpart |
| `/statusbar room title name` | Displaying 'name' as the title for MUC tabs. | statusbar.room.title=name |
| `/statusbar room title invalid` | Invalid usage, see '/help statusbar' for details. | |
| `/titlebar room title bookmark` | MUC windows will display 'bookmark' as the window title. | titlebar.muc.title=bookmark |
| `/titlebar room title jid` | MUC windows will display 'jid' as the window title. | titlebar.muc.title=jid |
| `/titlebar room title localpart` | MUC windows will display 'localpart' as the window title. | titlebar.muc.title=localpart |
| `/titlebar room title name` | MUC windows will display 'name' as the window title. | titlebar.muc.title=name |
| `/titlebar room title invalid` | Invalid usage, see '/help titlebar' for details. | |
| `/roster room use jid` | Invalid usage, see '/help roster' for details. | |
| `/roster room use name` | Invalid usage, see '/help roster' for details. | |
| `/roster room show server` | Invalid usage, see '/help roster' for details. | |
| `/roster room hide server` | Invalid usage, see '/help roster' for details. | |
| `/statusbar room jid` | Invalid usage, see '/help statusbar' for details. | |
| `/statusbar room room` | Invalid usage, see '/help statusbar' for details. | |
| `/titlebar show jid` | Invalid usage, see '/help titlebar' for details. | |
| `/titlebar hide jid` | Invalid usage, see '/help titlebar' for details. | |
| `/titlebar show name` | Invalid usage, see '/help titlebar' for details. | |
| `/titlebar hide name` | Invalid usage, see '/help titlebar' for details. | |
### Display Set Preferences
| Test | Window |
| :--- | :--- |
| /prefs ui | - Roster rooms title (/roster) : name<br>- Room tab display (/statusbar) : name<br>- MUC window title (/titlebar) : name |
### Test MUC Window
#### Test: without *name* preference, without *room name* field
```
/join muc@dmn.im
/room config
/field1 ""
/form submit
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` | | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` | | | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc | | |
#### Test: with *name* preference, without *room name* field
```
/roster room title name
/statusbar room title name
/titlebar room title name
/save
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` | | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` | | | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc | | |
#### Test: without *name* preference, with *room name* field
```
sed -i "/roster.rooms.title=/d" profrc
sed -i "/statusbar.room.title=/d" profrc
sed -i "/titlebar.muc.title=/d" profrc
/join muc@dmn.im
/room config
/field1 "my_room"
/form submit
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | my_room | my_room | my_room |
| `/room config` | | my_room conf | my_room config |
| `/field2 edit` | | | my_room config * |
| `/msg tst` | tst | my_room/tst | my_room/tst |
| `/roster room by service` | my_room | | |
#### Test: with *name* preference, with *room name* field
```
/quit
/roster room title name
/statusbar room title name
/titlebar room title name
/save
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | my_room | my_room | my_room |
| `/room config` | | my_room conf | my_room config |
| `/field2 edit` | | | my_room config * |
| `/msg tst` | tst | my_room/tst | my_room/tst |
| `/roster room by service` | my_room | | |
#### Test: with *localpart* preference
```
/quit
/roster room title localpart
/statusbar room title localpart
/titlebar room title localpart
/save
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc | muc | muc |
| `/room config` | | muc conf | muc config |
| `/field2 edit` | | | muc config * |
| `/msg tst` | tst | muc/tst | muc/tst |
| `/roster room by service` | muc | | |
#### Test: with *bookmark* preference, without *bookmark name*
```
/quit
/roster room title bookmark
/statusbar room title bookmark
/titlebar room title bookmark
/save
/quit
/bookmark add muc@dmn.im
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/bookmark join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` | | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` | | | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc | | |
#### Test: with *bookmark* preference, with *bookmark name*
```
/quit
/bookmark remove muc@dmn.im
/bookmark add muc@dmn.im name "my_bookmark"
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/bookmark join muc@dmn.im` | my_bookmark | my_bookmark | my_bookmark |
| `/room config` | | my_bookmark conf | my_bookmark config |
| `/field2 edit` | | | my_bookmark config * |
| `/msg tst` | tst | my_bookmark/tst | my_bookmark/tst |
| `/roster room by service` | my_bookmark | | |
#### Test: with *jid* preference
```
/quit
/roster room title jid
/statusbar room title jid
/titlebar room title jid
/save
/quit
```
| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` | | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` | | | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc | | |
### Test Contact Chat Window Title
#### Test: without contact nick
```
/roster add tst@dmn.im
```
| Test | Titlebar |
| :--- | :--- |
| `/msg tst@dmn.im` | tst<span/>@dmn.im |
#### Test: with contact nick
```
/roster add tst@dmn.im my_tst
```
| Test | Titlebar |
| :--- | :--- |
| `/msg my_tst` | my_tst <tst<span/>@ike.snikket.chat> |
### Test Preference Upgrade
#### Test /roster
| Test | profrc |
| :--- | :--- |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=name' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.server=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc` | Original key removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=false' profrc` | Original keys removed.<br>roster.rooms.title=localpart |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=true' profrc` | Original keys removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=' profrc` | Original keys removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\statusbar.room=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\statusbar.room=room' profrc` | Original key removed.<br>statusbar.room.title=localpart |
| `sed -i '/\[ui\]/a\statusbar.room=jid' profrc` | Original key removed.<br>statusbar.room.title=jid |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=false' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=false' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=false' profrc` | Original key removed.<br>titlebar.muc.title=jid |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=false' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original keys removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original keys removed. |
### Test Valgrind
No memory leaks detected relating to these changes.
2023-10-05 18:16:04 -06:00
Michael Vetter
191f571bcd
Fix spaces in /privacy description
2023-08-04 08:39:20 +02:00
Michael Vetter
13af6c96dc
Link from /privacy to relevant /account settings
...
Related to https://github.com/profanity-im/profanity/issues/1836
2023-07-25 20:14:29 +02:00
Michael Vetter
f7cce4c5c1
Move /os into /privacy os
...
Related to https://github.com/profanity-im/profanity/issues/1836
2023-07-25 16:35:14 +02:00
Michael Vetter
feba4b8263
Add cons_privacy_setting() to print privacy setting infos
2023-07-24 18:25:34 +02:00
John Hernandez
865a056315
Cleanup g_strfreev()
to auto_gcharv
...
Include some additional minor cleanups
2023-07-13 17:05:07 +02:00
John Hernandez
029f1caa52
Cleanup jid_destroy
to auto_jid
...
Remove unused variables
Apply minor cleanups
2023-07-13 17:05:07 +02:00
John Hernandez
8304ac86ff
g_free()
to auto_gfree
, introduce auto_guchar
...
Fix 11 potential mem leaks in theme.c
2023-07-13 17:04:59 +02:00
John Hernandez
3a4cd7da48
Cleanup and mem leak fix
...
Improve usage of `gchar` and `char` by setting them correctly
Increase usage of `auto_gchar` and `auto_char`
Fix 2 mem leaks (rosterwin.c, avatar.c)
2023-07-12 17:43:33 +02:00
John Hernandez
00bea804e2
Improve documentation two functions
...
Namely `cmd_process_input()` and `files_get_data_path()`.
Edited by @jubalh.
2023-07-11 13:26:37 +02:00
John Hernandez
e1d137f4e6
Change char->free to auto_char char for autocleanup
...
Replace `gchar` and `g_free` to `auto_gchar`
Correct certain `char` functions/variables to `gchar`
Related to #1819 .
Edited by @jubalh.
2023-07-11 13:26:37 +02:00
John Hernandez
4a70f5f513
Cleanup char*
to auto_gchar gchar*
for prefs_get_string
...
Necessity explained in #1819
2023-07-03 16:06:27 +02:00
John Hernandez
1c102fec27
Add /privacy logging
command
...
Add ability to completely turn logs off,
Needed since `/logging` and `/history` didn't stop history logging
in the DB, only in files.
Command might break something on usage,
hence it was primarily introduced for privacy geeks.
Privacy command discussion #1836
2023-07-03 16:06:24 +02:00
Michael Vetter
f67d548ebf
Merge pull request #1850 from H3rnand3zzz/feature/pgp-improved
...
Extend `/pgp` command to make key exchange procedure easier
2023-07-03 14:18:35 +02:00
John Hernandez
7d6cbfdcd2
Refactor autocomplete
...
Use `_cmd_ac_complete_params` when fits, thus reducing plurality
2023-07-02 14:25:55 +02:00
John Hernandez
36784738fc
Add optional pgp public key autoimport
...
Refactor `p_gpg_list_keys`
Add `/pgp autoimport` command,
it's not described in XEP-0027, but used in some clients,
such as PSI, Pidgin. It will autoimport keys received with
`/pgp sendpub`, in plain text as a message, or using features,
provided in other clients. It doesn't autoassign them, but shows
command to assign, letting user to decide.
Improve documentation for some preexisting functions
Add contact argument to `/pgp sendpub`
2023-07-02 14:25:55 +02:00
John Hernandez
349e4cb322
Refactor _cmd_set_boolean_preference
function
...
Improve documentation
Update code formatting and indentation for better readability
Show state if no argument provided
Show if argument wasn't changed
Reduce amount of arguments
2023-07-02 14:25:55 +02:00
John Hernandez
a59623a007
Add /pgp sendpub
command
...
Command allows to share your PGP pub key with ease,
it's not described in XEP-0027, but used in some clients,
such as PSI, Pidgin.
Fix typos
Minor improvements
2023-07-02 14:25:55 +02:00