1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00
Commit Graph

238 Commits

Author SHA1 Message Date
Michael Vetter
fe9b520c42 First MAM test
Send a request (which we can't handle yet) :-)

Regards https://github.com/profanity-im/profanity/issues/660
2020-04-11 16:05:14 +02:00
Michael Vetter
8112b8c84b Use proper OS names for OpenBSD and NetBSD 2020-03-09 11:24:14 +01:00
Dmitry Podgorny
d18ec23d0a Fix few memory leaks 2020-02-27 01:35:36 +02:00
Michael Vetter
8c34f2ce01 xep-0092: add config option to set whether OS is revealed
Default is on. `revail.os=false` in the `connection` section of the
config can disable it.
A command to configure this will follow.
2020-01-23 23:35:46 +01:00
Michael Vetter
cb1dbb2732 xep-0092: send OS too
So far we only sent client name and version. Let's also send the OS
name.
2020-01-23 23:18:55 +01:00
Michael Vetter
2d19ad0db4 Add option to notify about version request
Cannot be configured for now.
Can be set via `adv.notify.discoversion` in the `notification` section.

Will notify about version requests via XEP-0092 and XEP-0232.

Client version can still be seen via caps (capabilities).
See `stanza_attach_caps()`.
2020-01-23 22:54:47 +01:00
Michael Vetter
3066fd77fc Save MUC room name in ProfMucWin
We will need this if we want to display the Name instead of the JID.
2020-01-23 11:35:33 +01:00
Paul Fariello
84506cbaeb Use OMEMO for offline MUC members (#1242) 2020-01-20 14:28:13 +01:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
ef19b45e64 Remove old comment
It's not up to date.
Some time ago we changed from individual handlers to general ones.
2019-10-21 10:28:29 +02:00
Michael Vetter
53640f6e97 Remove prefix from stanza id
We sent `prof_prefix_uuid` as id. Where the prefix was also optional.
We don't need this at all.
2019-10-17 15:40:40 +02:00
Paul Fariello
b3e59e1fb6 Fix memleak in /cmd exec 2019-07-30 13:35:08 +02:00
Paul Fariello
5e61bc08dd Fix command form submit
Command form userdata were freed by iq_id_handler.
We should now free the command ourself.
2019-07-30 10:22:57 +02:00
Michael Vetter
c07d533ec1 Fixup for last commit 2019-07-12 11:11:45 +02:00
Michael Vetter
68b6deefbf Fix segfault in iq_{submit,cancel}_command_config
Taken care of by the destructor.
2019-07-12 10:57:07 +02:00
Michael Vetter
f32827d70d Fix some more potential double frees
Regards https://github.com/profanity-im/profanity/issues/1148
2019-07-11 16:15:57 +02:00
Michael Vetter
89d8fc846e Fix double free in room id handler
Free is done in destructor now.
Regards https://github.com/profanity-im/profanity/issues/1148
2019-07-09 09:47:35 +02:00
Michael Vetter
b3bb62dcbd Fix double free regarding iq handlers 2019-07-08 15:58:40 +02:00
Michael Vetter
9aad2aa487 Free iq_id_handlers correctly
so far only the key part was freed. We also need to free the actual
handler.

Fix:
```
==21171== 1,128 bytes in 47 blocks are definitely lost in loss record
3,476 of 3,670
==21171==    at 0x483677F: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==21171==    by 0x434248: iq_id_handler_add (iq.c:265)
==21171==    by 0x4B122E: omemo_devicelist_request (omemo.c:46)
==21171==    by 0x4AC411: omemo_start_session (omemo.c:409)
==21171==    by 0x4AC37C: omemo_start_sessions (omemo.c:396)
==21171==    by 0x447881: sv_ev_roster_received (server_events.c:189)
==21171==    by 0x444019: roster_result_handler (roster.c:312)
==21171==    by 0x433FC2: _iq_handler (iq.c:202)
==21171==    by 0x5AF118E: ??? (in /usr/lib64/libmesode.so.0.0.0)
==21171==    by 0x5AEDBDA: ??? (in /usr/lib64/libmesode.so.0.0.0)
==21171==    by 0x5AFA43E: ??? (in /usr/lib64/libmesode.so.0.0.0)
==21171==    by 0x6818AA4: ??? (in /usr/lib64/libexpat.so.1.6.8)
==21171==    by 0x681A3AB: ??? (in /usr/lib64/libexpat.so.1.6.8)
==21171==    by 0x681D7EB: XML_ParseBuffer (in
/usr/lib64/libexpat.so.1.6.8)
==21171==    by 0x5AF0A63: xmpp_run_once (in
/usr/lib64/libmesode.so.0.0.0)
==21171==    by 0x432E5D: connection_check_events (connection.c:104)
==21171==    by 0x4323B3: session_process_events (session.c:255)
==21171==    by 0x42C097: prof_run (profanity.c:128)
==21171==    by 0x4B2627: main (main.c:172)
```
2019-07-04 14:25:53 +02:00
Michael Vetter
11b8204d14 Call iq_handlers_clear() upon disconnect
Free id_handlers. Fix memory leaks.
2019-06-20 12:37:32 +02:00
Dmitry Podgorny
6138a5f79b Cancel autoping timer on disconnect or connection loss
If Profanity is disconnected in any way before ping response is
received, the autoping timer will expire after the next connection
is established. As result, user will be disconnected immediately.

Cancel autoping timer in ev_disconnect_cleanup(), so it is done
for all kind of disconnections.
2019-06-03 13:28:00 +03:00
Paul Fariello
21ae946896 Handle MUC anonymous state when auto starting OMEMO
When auto joining a MUC we don't have access to required information so
we just don't start OMEMO at this time.

Once we receive disco info we then try to start OMEMO.
2019-04-17 14:03:14 +02:00
Paul Fariello
4ad6904216 Wait for discovery end to publish omemo devicelist and bundle
Add sv_ev_connection_features_received for that purpose
2019-04-10 17:23:46 +02:00
Paul Fariello
2d28725c85 Rename ProfIdCallback into ProfIqCallback
Goal is to create other kind of callback no based on id cmp
2019-04-10 16:03:50 +02:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Paul Fariello
ac2d1c07fa Fix optionnal sessionid in xep 0050 2019-01-21 15:02:54 +01:00
Paul Fariello
2e0bc27bf0 Make _get_groups_from_item and roster _compare_* public
In order to avoid duplication with xep 0133 support in command execution
2018-09-26 14:34:52 +02:00
Paul Fariello
01428eb858 Add special handling for xep-0133 get-user-roster 2018-09-10 13:09:23 +02:00
Paul Fariello
6de60e7efc Add support for ad-hoc response with forms 2018-09-10 12:28:28 +02:00
Paul Fariello
b7556b4e41 Add missing command name for completion log 2018-09-10 11:30:46 +02:00
Paul Fariello
ec5fc3612f Allow to use cmd without being in a window 2018-09-05 13:52:20 +02:00
Paul Fariello
233e076be9 Add support for command config execution 2018-09-05 13:52:19 +02:00
Paul Fariello
b11d3a79df Add conf win callback 2018-09-05 13:51:00 +02:00
Paul Fariello
a952776b89 Rename mucconf wins into conf wins
Configuration windows are now being used by both muc and cmd.
2018-09-05 13:51:00 +02:00
Paul Fariello
7123e94e82 Add support for form edition in command execution
Also change wins_get_by_string prototype in order to handle const str.
2018-09-05 13:51:00 +02:00
Paul Fariello
40eee1caab Add command exec error handling 2018-09-05 13:51:00 +02:00
Paul Fariello
925cd488c1 Handle simple execution
Tested with ping from biboumi
2018-09-05 13:50:59 +02:00
Paul Fariello
c9f6a78f57 Add command subcommands: list and exec
Also handle list result
2018-09-05 13:49:40 +02:00
Paul Fariello
ca022ec75e Add command command
Initial commit to test commands API
2018-09-05 13:42:28 +02:00
Michael Vetter
6d80700329 Move ID generation to xmpp folder
create_unique_id() was changed to use UUIDs instead of a counter in the
last commit. Since now it depends on connection_create_uuid() which is
in the xmpp subfolder the function should also be moved there.

Renamed it to connection_create_stanza_id() and moved it to
src/xmpp/connection.c.

Discussion happened in https://github.com/boothj5/profanity/pull/1010
2018-08-30 11:17:04 +02:00
Dominik Heidler
86a9ef7b5c Use correct macro
XMPP_FEATURE_PING insted of STANZA_NS_PING
2018-07-30 11:04:54 +02:00
James Booth
26a182945f Add /rooms cache 2018-02-05 20:01:54 +00:00
James Booth
8db2389df6 Filter rooms by simple case insensitive text 2018-02-04 21:59:33 +00:00
James Booth
a04b02c928 Include filter string in no rooms message 2018-01-28 00:13:36 +00:00
James Booth
e571ccd8ea Fix tests, move glob creation 2018-01-27 23:51:03 +00:00
James Booth
2e414797a4 Allow filtering rooms list by glob 2018-01-27 22:42:31 +00:00
James Booth
250e972b7a Update copyright 2018-01-21 15:00:02 +00:00
James Booth
4a6bf68727 Merge remote-tracking branch 'asdil12/ping' 2017-06-17 21:49:19 +01:00
Dominik Heidler
29f84ea3d4 Disable autoping if server doesn't support it
fixes #859
2017-06-16 12:11:44 +02:00
James Booth
68a3daedb9 Update Copyright 2017-01-28 17:24:22 +00:00