1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-10-27 20:30:13 -04:00
Commit Graph

778 Commits

Author SHA1 Message Date
Michael Vetter
10ca3e8c31 Possibility to specify alternative config file
Introduce `profanity -c` to specify an alternative config file.
2019-08-02 15:55:47 +02:00
Michael Vetter
88552da2d4 Add omemo_close stub for tests 2019-07-18 08:02:52 +02:00
Paul Fariello
ecf00af05b Add missing stub file 2019-07-17 16:02:12 +02:00
Paul Fariello
db8f32c049 Fix handling of encrypted carbons 2019-06-21 15:52:24 +02:00
Paul Fariello
f831f65737 Rename prof_message_t into ProfMessage 2019-06-20 14:30:45 +02:00
Paul Fariello
44d16e9141 Add prof_message_t to wrap all message attributes
Probably missing copy of body to plain in carbon and privmessage.
Only covers the incoming message path because goal is OMEMO decryption
of untrusted message.
Cover some of the log functions but not all.
2019-06-20 14:30:42 +02:00
Michael Vetter
6c9631d7ea Fix prefs_get_str related leaks in unit tests
Related to https://github.com/profanity-im/profanity/issues/1019
2019-06-19 17:15:47 +02:00
Michael Vetter
de787a8582 Remove cons_mouse_setting() stub
Mouse support has been disabled long ago.
2019-06-17 13:30:56 +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
Frank Zschockelt
4683395aca Use mock_type() for casting mock() 2019-05-08 21:52:16 +02:00
Frank Zschockelt
a5db791dc4 Use mock_ptr_type() to silence compiler warnings
Unit tests on 32-bit architectures were failing due to
"cast to pointer from integer of different size" warnings.
mock_ptr_type silences those by first casting to uintptr_t.
2019-05-08 21:51:29 +02:00
Michael Vetter
a28f0d9e74 Update tests with new URL
https://github.com/profanity-im/profanity/issues/1085
2019-05-03 10:46:41 +02:00
Michael Vetter
0d8a39d8dd Add occupantswin_occupants_all() stub to unittest 2019-04-23 14:47:42 +02:00
Paul Fariello
6d39f49f57 Fix server_event unit tests
roster_update_presence now requires that
roster_process_pending_presence() has been called. Otherwise presence
are set to pending and not processed yet.
2019-04-17 14:19:31 +02:00
Paul Fariello
3ef9123ccb Fix OTR unit test after account_new API change 2019-04-17 14:03:14 +02:00
Paul Fariello
7df7e05639 Fix unit test after account_new API change 2019-04-17 14:03:14 +02:00
Michael Vetter
b40fcf248c Add omemo_start_sessions to unittest stub 2019-04-14 00:02:17 +02:00
Paul Fariello
0bc660400b Automatically starts OMEMO if one identity is trusted 2019-04-10 17:24:56 +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
e69f947547 Rework MUC reflected message filtering
Reflected messages can't be filtered by nick only otherwise you might
ignore messages comming from you on another devices.

Consequently we maintain a list of sent messages id in mucwin.
To be sure the id will be correctly reflected we use the origin-id
stanza.
2019-04-10 17:23:46 +02:00
Paul Fariello
e7be3a605b Add OMEMO in prefs command 2019-04-10 17:23:46 +02:00
Paul Fariello
daf84ced0c Add required OMEMO stub for unit-test 2019-04-10 17:23:45 +02:00
Philip Flohr
5b7f9dffbc Fix broken support for case-sensitive account names
Don't lower account name before calling accounts_get_account().
Only lower if there is no account with the given name and the name is
interpreted as a jid.
Updated unittests to test this behaviour.

Fixes #725

.
2019-02-22 13:08:08 +01:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Dmitry Podgorny
e3f2ca7d10 tests: remove cflag -w and fix warnings
The flag hides errors. But we want unit tests to be correct in order
to reveal errors in the main code.

The patch removes tests_unittests_unittests_CFLAGS which makes autotools
use AM_CFLAGS instead. Therefore, unit tests are built with flags
derived from configure.ac.
2018-10-31 18:35:59 +02:00
Michael Vetter
47f90d7a39
Merge pull request #991 from paulfariello/feature/xep-0050
Add support for xep 0050 ad-hoc commands, without multi-step
2018-09-27 17:27:37 +02:00
Michael Vetter
82f8083b85 Move p_sha1_hash() to stanza.c
Move `p_sha1_hash()` from `common.c` to	`xmpp/stanza.c` as it is only
used in this file and now depends on libstrophe so xmpp is a better
namespace folder.
Renaming it as `_stanza_create_sha1_hash()`. And making static since
only used here.

The function cannot be tested in the unit tests anymore.
Once functional tests are working again we should write a test for the
sha1 functionality.
2018-09-06 20:40:09 +02:00
Paul Fariello
f0f973fcb4 Remove unused stup session_get_domain 2018-09-05 15:34:22 +02:00
Paul Fariello
e9e5f382da Add connection_get_domain stub for tests 2018-09-05 15:13: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
c9f6a78f57 Add command subcommands: list and exec
Also handle list result
2018-09-05 13:49:40 +02:00
Rafael Sadowski
bcaf55e5b8 fix: Missing pthread include 2018-08-13 17:19:51 +02:00
James Booth
ee664bf1d2 Add room /me functional tests 2018-04-21 20:40:11 +01:00
James Booth
59382984c0 Add preferences for tab display 2018-03-09 21:15:27 +00:00
James Booth
720dce866e Add prefs for empty tabs and tab names 2018-03-08 22:27:49 +00:00
James Booth
119c5650cf Show name in statusbar tabs WIP 2018-03-08 20:01:36 +00:00
James Booth
7c5ece24c5 Use jid argument for /bookmark when in room
fixes #983
2018-03-04 00:35:53 +00: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
e571ccd8ea Fix tests, move glob creation 2018-01-27 23:51:03 +00:00
James Booth
f189dbc687 Only send ping requests to client that support it 2017-06-16 00:59:21 +01:00
James Booth
970ab94ed3 Change server name in functional tests 2017-06-15 23:30:39 +01:00
James Booth
6511d61b13 Show message when server does not support ping 2017-06-15 23:27:30 +01:00
James Booth
d52355d72c Set locale in unit tests
issue #901
2017-04-29 20:33:28 +01:00
James Booth
6b830277a6 Allow previous autocompletion with shift tab 2017-04-01 00:27:11 +01:00
James Booth
1b9d033cef Add test for case insensitive autocomplete 2017-03-25 20:46:31 +00:00
James Booth
b5e0106526 Autocomplete accent and case insensitive 2017-03-25 01:40:20 +00:00
James Booth
286fecf38d Allow installing plugins from directory 2017-02-05 21:09:03 +00:00