Paul Fariello
84506cbaeb
Use OMEMO for offline MUC members ( #1242 )
2020-01-20 14:28:13 +01:00
Michael Vetter
9ac72980d1
xep-0084: add test stub file
2019-12-18 15:44:59 +01:00
Michael Vetter
136f504d5e
test: add cons_color_setting
2019-12-09 16:18:51 +01:00
Michael Vetter
750355acc4
Add cons_logging_setting() to test stub
2019-11-13 09:36:29 +01:00
Michael Vetter
b9734c8496
Add cons_titlebar_setting stub
...
and remove encwarn one.
2019-11-05 22:10:51 +01:00
Michael Vetter
f71de61b9d
Don't override ProfMessage Id with origin-id
...
Profanity sends the same value for both. Other clients might not.
Safe both since we could need them later.
Once we implement Last Message Correction we will need the regular id.
If we override it with origin-id and another client chooses to not use
the same value for id and origin-id then we can't interpret the id sent
with the LMC request correctly.
2019-10-31 13:45:44 +01:00
Michael Vetter
6bfdc5422c
Adjust message stubs in unit tests
2019-10-29 11:55:27 +01:00
Michael Vetter
8764e59650
Adjust stub for connection_get_profanity_identifier
2019-10-22 14:24:07 +02:00
Michael Vetter
c3912df05b
Move ProfMessage and message_is_sent_by_us to xmpp
...
Not meant for internal usage only.
2019-10-19 06:36:47 +02:00
Michael Vetter
72bdae1014
Add message_is_sent_by_us stub
2019-10-18 14:53:06 +02:00
Michael Vetter
3bd5c9f535
Remove accidentally added file
2019-10-18 12:24:34 +02:00
Michael Vetter
5c6f5ba0f7
Add connection_get_profanity_identifier stub
...
And move defintion to xmpp.h
2019-10-18 11:23:30 +02:00
Dmitry Podgorny
0499c4e0ee
Fix memory leak in unittests
2019-10-14 00:23:02 +03:00
Michael Vetter
8e5dafdea5
Fix invalid reads in unit tests
2019-10-10 19:02:23 +02:00
Michael Vetter
2559ad5370
Revert "Free lits in test_cmd_roster unittest"
...
This reverts commit 5b19ed28ce
.
This caused a segfault.
2019-10-10 18:08:24 +02:00
Michael Vetter
a10ab4e692
First destroy roster then free list in test_cmd_roster
2019-10-06 19:13:45 +02:00
Michael Vetter
98676613fd
Free strings in test_cmd_alias
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:45:53 +02:00
Michael Vetter
5b19ed28ce
Free lits in test_cmd_roster unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:43:27 +02:00
Michael Vetter
1d23d6461d
Remove not needed strdupin test_cmd_rooms
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:40:51 +02:00
Michael Vetter
5349b60385
Free autocomplete_complete results in unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:34:28 +02:00
Michael Vetter
2526e396f8
Fix autocomplete memleak in test_autocomplete
...
autocomplete_free() calls autocomplete_clear() and then frees the struct
itself.
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:26:34 +02:00
Michael Vetter
700f97d78c
Free lists in test_roster_list
...
Fix memleaks.
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 18:06:30 +02:00
Michael Vetter
9e6bc99d08
Fix two memleaks in test_parser
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:59:46 +02:00
Michael Vetter
1fabb61b40
Fix memleak in cmd_bookmark_list_shows_bookmarks unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:54:40 +02:00
Michael Vetter
6776e39644
Fix memleak in test_parser unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:50:29 +02:00
Michael Vetter
d2a087145c
Fix memleak in test_callbacks unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:47:13 +02:00
Michael Vetter
4f11140bb5
Fix memleak in test_parser unittest
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:43:10 +02:00
Michael Vetter
81b537b36d
Fix test_callbacks memleak
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:15:06 +02:00
Michael Vetter
ae9ef75bab
Fix test_jid unittest memleak
...
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-06 17:07:00 +02:00
Michael Vetter
fd18230cd4
Fix unittest memleak in test_cmd_join
...
muc_init() call without muc_close()
Regards https://github.com/profanity-im/profanity/issues/1019
2019-10-05 23:38:10 +02:00
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