1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

4888 Commits

Author SHA1 Message Date
Michael Vetter
28476e578b build: add conditional omemo sources 2021-12-01 19:46:34 +01:00
Michael Vetter
f2684e9166 build: use file object instead of strigns for source files
See
https://github.com/profanity-im/profanity/pull/1619#pullrequestreview-820629048
2021-12-01 19:18:35 +01:00
Michael Vetter
9e0e6e2524 build: add otr sources correctly
See
https://github.com/profanity-im/profanity/pull/1619#discussion_r760443828
2021-12-01 19:14:16 +01:00
Michael Vetter
65ee9e8886 build: add internal otr dependency
We need to add the header files to the include dir conditionally too.
2021-12-01 19:06:32 +01:00
Michael Vetter
46857e84c9 build: use pgp and otr deps correctly
* Used the wrong define BUILD_PGP instead of HAVE_LIBGPGME
* Need to add the sources conditionally
2021-12-01 18:38:39 +01:00
Michael Vetter
6ded48c4b4 meson: add basic meson build files
Can only build minimal profanity without optional dependencies yet.
Not all functionality from autoconf is in here yet.
2021-10-21 21:40:30 +02:00
Michael Vetter
46c8245af9 Format new register code correctly 2021-10-13 21:32:44 +02:00
Michael Vetter
e0e45b7b24
Merge pull request #1574 from binex-dsk/master
Add in-band account registration
Fix https://github.com/profanity-im/profanity/issues/199
2021-10-13 21:19:22 +02:00
swirl
0653200965 registration: memory leaks, error checking 2021-10-13 15:02:05 -04:00
swirl
feaa770444 fixed crashes when server doesn't support registration 2021-10-10 15:43:14 -04:00
Michael Vetter
f21595597f Format code correctly 2021-10-05 10:01:27 +02:00
MarcoPolo-PasTonMolo
97551aa131 Fix history timestamp
Fixes https://github.com/profanity-im/profanity/issues/1423

Oldest stanza is fetched like before but now the timestamp is generated by creating date_time_from_iso8601 and then to_local, instead of trusting that the timestamp is in utc.
The procedure previously was stamp = time_val_from_iso8601() then date_time = date_time_from_utc(stamp) then local_date_time = to_local(date_time)
2021-10-05 09:56:24 +02:00
Michael Vetter
242696f09a Fix fromat string in statusbar
Regards https://github.com/profanity-im/profanity/issues/1597#issuecomment-930540261
2021-09-29 23:25:38 +02:00
Michael Vetter
e5b6258c99 Fix wrong format string in titlebar
See
fd9ccec8dc
and
https://github.com/profanity-im/profanity/issues/1597#issuecomment-930426764.
2021-09-29 20:17:41 +02:00
Michael Vetter
3120636367 Add more help about how to use plugins
`/plugins install` installs a plugin to
`.local/share/profanity/plugins`.
And also loads it.
When a plugin is loaded it will automatically be added to the `profrc`
file like this:

```
[plugins]
load=my.py;
```

On the next start Profanity will try to load this plugin again unless
`/plugin unload my.py` is called.
2021-09-29 17:32:54 +02:00
Michael Vetter
b0e0012c22 Fix /plugins update ~/dir
If `~/dir` exists profanity exits for me.
Whole code for updating plugins from a dir isn't even implemented. Even
though some messgages suggest otherwise.

Remove this and only allow updating of one file.
2021-09-29 17:32:54 +02:00
Michael Vetter
25820235fe List globally available plugins
Packagers can package https://github.com/profanity-im/profanity-plugins
or another collection of plugins to `/usr/local/share/profanity/plugins`
(python) and `/usr/local/lib64/profanity`  (c).
`/plugins` will list these globally available plugins now along with the
ones thare are installed (`~/.local/share/profanity/plugins`) and loaded.

Regards https://github.com/profanity-im/profanity/issues/945
2021-09-29 17:32:54 +02:00
Michael Vetter
7486e22b77 Look for plugins to install in global location
Two options to install plugins.
Mention the whole path:
`/plugins install ~/src/profanity-plugins/my.py`

Mention only the plugin name:
`/plugins install my.py`

The latter will look in `/usr/local/share/profanity/plugins/` for the
file and copy it over to `~/.local/share/profanity/plugins`.

At first I was thinking about loading the plugins from the global
location. But users most likely don't want to have all plugins activated
that an admin installs on a system.

Regards https://github.com/profanity-im/profanity/issues/945
2021-09-29 17:32:54 +02:00
Michael Vetter
ba7b6c2e96 Clean sourcepath from profrc
See 3b3a6b7a75 for sourcepath removal.
2021-09-29 17:32:54 +02:00
Michael Vetter
3b3a6b7a75 Remove /python sourcepath
I feel like this mostly is confusing people.
Also don't see much value for it.

To me it looks like a regular workflow is like:
```
/plugin install ~/src/profanity-plugins/my.py
```

The whole thing with sourcepath, install (which also loads without
having that described anywhere), load etc is confusing.
Also each plugin file that is present in
`.local/share/profanity/plugins` will then be auto loaded. Which means
after installation.
2021-09-29 15:49:05 +02:00
Michael Vetter
fd9ccec8dc Fix wrong format string in titlebar encryption
Fix https://github.com/profanity-im/profanity/issues/1597

Thanks @debacle.
2021-09-29 15:48:09 +02:00
Michael Vetter
8e43ab05da Fix typos 2021-09-22 13:01:55 +02:00
Michael Vetter
31d72689c7 Add more keybindings to /help navigation 2021-09-15 11:29:20 +02:00
Michael Vetter
1dbe1a33b4 cmd_funcs: Use glib function 2021-09-09 09:53:23 +02:00
Michael Vetter
8c4ce7a939 notifier: Use glib function 2021-09-09 09:48:04 +02:00
Michael Vetter
0a8d69dc46 Enable whole word only notifications by default
Set PREF_NOTIFY_MENTION_WHOLE_WORD to true.

If I'm not mistaken the _mucwin_print_mention() / get_mentions()
functions only work correctly since
6bc440c6f7.

This changed the behaviour for users.
They got notified when their nick was `kaffee` and in the message the
string `kaffeekanne` occured.

Setting `/notify room mention word_whole` corrected this.

So my idea is that only now the mention function work correctly. And to
have a good default behaviour we should set the `word_whole` on by
default.

Regards https://github.com/profanity-im/profanity/issues/1578
2021-09-08 12:04:34 +02:00
Michael Vetter
c397657061 Change attentionflag shortcut to alt+v
alt+f is the default readline shortcut for forward one word.

Regards https://github.com/profanity-im/profanity/issues/1580
2021-08-31 22:25:29 +02:00
Paul Fariello
314d0034ed Fix memleak 2021-08-20 15:33:31 +02:00
Paul Fariello
35814d8bd0 Log error received while publishing OMEMO device list 2021-08-20 15:32:00 +02:00
Paul Fariello
6f33706e92 Cosmetic 2021-08-20 15:29:30 +02:00
Paul Fariello
4d93df4aba OMEMO: Fix precondition-not-met handling 2021-08-19 10:02:07 +02:00
Paul Fariello
d8cee98cc7 Create devicelist if it doesn't exists 2021-08-19 10:02:07 +02:00
Paul Fariello
0b6cf20183 OMEMO: try device list creation and reconfigure on precondition-not-met 2021-08-19 10:02:07 +02:00
Paul Fariello
46fe69de9b Ensure devicelist access model is configured before updating it 2021-08-19 10:02:06 +02:00
swirl
87d2c95c87 registration: remove auth param and excess functions 2021-08-17 14:09:48 -04:00
Michael Vetter
f53b4353fd REGISTRATION FIXED 2021-08-17 14:09:48 -04:00
swirl
8a6f1b52d7 progress on fixing registration
doesnt segfault on register, but aborts when you type after registering

need to find a way to disconnect later
2021-08-17 14:09:48 -04:00
swirl
4d3f26154e hacky fix(?) for register
very bad and spaghetti will fix later
2021-08-17 14:09:48 -04:00
swirl
2cc354b6ae fixed some bugs, added some more
- Added JABBER_RAW_CONNECT[ING/ED] connection states
- Added cl_ev_connect_raw and session_connect_raw to conform to normal
connection functions
- Fixed SIGABRT during registration
- Added a check in cmd_register to ensure it's actually connected before
registering--but this will always fail atm
2021-08-17 14:09:48 -04:00
swirl
5ea1ccbb46 /register: parameter updates
add auth param, switch host and username params, rename host param to server
2021-08-17 14:09:48 -04:00
swirl
d9366a26d6 initial register command test 2021-08-17 14:09:48 -04:00
Michael Vetter
4641537721 omemo: always free error and print warning
Fix https://github.com/profanity-im/profanity/issues/1584
2021-07-22 08:29:05 +02:00
Dmitry Podgorny
2e0adbd004 chatwin: fix memory leak when load history
_chatwin_history() reassigns msg->plain without freeing previous
string. This leads to memory leak. As a temporary solution, free
replaced string.

Fixes #1585.
2021-07-20 22:15:57 +03:00
Michael Vetter
9bd635d7e6 accounts: get rid of guard around free 2021-07-17 23:13:01 +02:00
Michael Vetter
ba414eb0ac
Merge pull request #1583 from profanity-im/memleak
Fix memory leak in accounts_get_login_status()
2021-07-17 23:10:15 +02:00
Dmitry Podgorny
c0ea27f2f0 Don't handle /me in the middle of a message with mentions 2021-07-17 19:36:31 +03:00
Dmitry Podgorny
a5d15e224c Fix buffer overread in _mucwin_print_mention()
Offset for g_utf8_substring() is higher than the string length. We can
avoid g_utf8_substring() for the tail and simply convert starting offset
to a pointer.
2021-07-17 19:33:28 +03:00
Dmitry Podgorny
afdae6ac02 Reduce copy-paste in sv_ev_roster_received() 2021-07-17 18:12:42 +03:00
Dmitry Podgorny
e7b6051e57 Fix memory leak in accounts_get_login_status() 2021-07-17 18:11:32 +03:00
Michael Vetter
73571f0aa3
Merge pull request #1576 from DebXWoody/autocomplete-untrust
OMEMO autocomplete untrust
2021-07-12 09:20:21 +02:00