Michael Vetter
3c56b289ed
Add slashguard feature
...
New command `/slashguard` tries to protect against typing ` /quit` by
not allowing a slash in the first 4 characters.
2020-03-18 18:20:05 +01:00
Michael Vetter
0cc4ac5cbc
Add cons_avatar_setting to unit test stub
2020-03-10 07:17:54 +01:00
Michael Vetter
f055faf31c
Fix log test stub
2020-02-21 21:29:14 +01:00
Michael Vetter
4b1b035654
Fix test stub
...
Change done in eb2fbdba2e
2020-02-21 19:16:52 +01:00
Michael Vetter
1f8b1eb740
Allow utf8 symbols as omemo/pgp/otr indicator char
...
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
8ee2cdadc8
Parse mentions and triggers in muc history if display is 'regular'
...
Fix https://github.com/profanity-im/profanity/issues/1261
2020-02-20 10:28:24 +01:00
William Wennerström
b267b065f5
Add builds.sr.ht CI for OpenBSD
...
* Add .builds/openbsd.yml for builds.sr.ht
* Update travis-build.sh -> ci-build.sh with OpenBSD case
* Fix libdl check in configure.ac (OpenBSD has libdl built-in)
* Fix some minor issues found when compiling on OpenBSD with GCC (e.g.
uninitialized variables)
2020-02-17 10:54:15 +01:00
Michael Vetter
ca3afa7e05
test: Init window.layout to make compiler happy
...
Fix tests/unittests/test_cmd_otr.c:415: warning: 'window.layout' is used
uninitialized in this function on openbsd (thanks optmzr)
2020-02-14 14:40:20 +01:00
Michael Vetter
c614cc288a
Fix tests
2020-02-14 10:17:07 +01:00
Michael Vetter
fb68d44264
xep-0308: adapt unit test stubs
2020-02-14 10:17:07 +01:00
Michael Vetter
83b61e5160
xep-0308: add cons_correction_setting stub to tests
2020-02-10 14:59:10 +01:00
Paul Fariello
137dc15bc8
Fix unittest build
2020-01-31 10:25:45 +01:00
Paul Fariello
a52e3ea1d8
Add context to autocomplete_with_func and use it for omemo trust command
...
Fix #1068
2020-01-31 10:07:08 +01:00
Michael Vetter
663aa09cce
Add cons_os_setting stub for tests
2020-01-24 21:26:40 +01:00
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
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
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
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
James Booth
68a3daedb9
Update Copyright
2017-01-28 17:24:22 +00:00
James Booth
6679b890a0
Fix multibyte chars in prof_occurrences
...
issue #901
2017-01-26 00:52:13 +00:00
James Booth
9cfd17821c
Allow room display properies to be set by plugins
2017-01-20 23:26:14 +00:00
James Booth
c8874cd2e0
Allow chat prefix char to be set by plugins
2017-01-20 21:03:55 +00:00
James Booth
1b25aa84cb
Add titlebar encryption text to plugins api
2017-01-19 22:33:29 +00:00
James Booth
70e831e08b
Fix tests
2017-01-16 00:21:57 +00:00
James Booth
2b7894ccff
Remove status from cl_ev_presence_send
...
fixes #888
2017-01-15 23:59:31 +00:00
James Booth
e043029a50
Allow clearing account resource
...
issue #880
2016-11-22 00:39:52 +00:00
James Booth
609d05366c
Use server features for account muc service
...
issue #878
2016-11-20 02:09:34 +00:00
James Booth
333403d2e5
Remove ui_current_print_formatted_line
2016-10-16 22:13:49 +01:00
James Booth
769e71b17b
Remove ui_current_print_line
2016-10-16 21:45:48 +01:00
James Booth
f3aebd547c
Use varargs in win_println_indent
2016-10-15 21:05:26 +01:00
James Booth
711c5b8e45
Add win_appendln
2016-10-15 19:19:44 +01:00
James Booth
8f1d3ab55c
Add win_print
2016-10-15 18:29:02 +01:00
James Booth
3612270e90
Rename win_println -> win_println_indent
2016-10-15 17:23:02 +01:00
James Booth
5488fd6e72
Remove win_vprintln_ch
2016-10-15 17:17:17 +01:00
James Booth
478c749ff9
Remove ui_current_error_line
2016-10-15 17:08:29 +01:00
James Booth
9d075c9805
Remove ui_win_error_line
2016-10-15 17:07:15 +01:00
James Booth
6ed04d87b3
Rename win_get_string -> win_to_string
2016-10-15 16:41:37 +01:00
James Booth
33b4b79f2e
Add ch arg to win_printf_line
2016-10-15 00:04:57 +01:00
James Booth
97898ee082
Add win_printf_line
2016-10-12 00:14:55 +01:00
James Booth
0890179fc4
Remove win_print, use win_printf instead
2016-10-11 23:38:59 +01:00
James Booth
0337c5b22c
Rename win_vprint -> win_printf
2016-10-11 23:10:48 +01:00
James Booth
c40660b0d8
Use current room for /bookmark add and /bookmark remove
2016-10-05 00:52:57 +01:00
James Booth
da437642a5
Merge branch 'master' into win-order
2016-09-25 23:32:15 +01:00
James Booth
a48df40138
Fix assertion errors in unit tests
2016-09-25 23:30:44 +01:00
James Booth
d3cc5bd7ed
Allow vertical positioning of all windows
2016-09-23 00:56:53 +01:00
James Booth
3983ee1d6b
Rename /titlebar -> /wintitle
2016-09-22 21:42:00 +01:00
James Booth
0aa758cbfb
Add /inputwin top|bottom command
...
closes #853
2016-09-19 23:40:45 +01:00
James Booth
ea98a8b04a
Rename Bookmark->jid to Bookmark->barejid
2016-08-28 22:12:50 +01:00
James Booth
0886062806
Use hash table for bookmarks
2016-08-21 15:25:49 +01:00
James Booth
a978bb12bf
Send receipt request only when receiver supports feature
...
issue #829
2016-08-18 22:53:23 +01:00
James Booth
4de570b1ee
Only include receipts feature in disco responses when enabled
...
issue #829
2016-08-18 00:10:15 +01:00
James Booth
9945246a64
Use hashtables for plugin disco features
2016-08-17 23:21:48 +01:00
James Booth
80eb5bee90
Rename Capabilties -> EntityCapabilities
2016-08-13 16:39:25 +01:00
James Booth
a3a73cf003
Move all filepath handling to files.c
2016-07-24 21:49:35 +01:00
James Booth
29452f8f1b
Move xgd functions
2016-07-24 17:12:09 +01:00
James Booth
6cc4abedc5
Move window functions to window_list.c
2016-07-24 17:02:09 +01:00
James Booth
e7bfaa643f
Move autoaway check
2016-07-24 16:06:24 +01:00
James Booth
5bc38b6bc2
Moved window_list.c
2016-07-24 15:14:46 +01:00
James Booth
90b9b48ab9
Moved roster_list.c
2016-07-24 15:08:47 +01:00
James Booth
2af0d38e3d
Moved muc.c
2016-07-24 15:02:43 +01:00
James Booth
1c5efaeb58
Moved jid.c
2016-07-24 14:59:28 +01:00
James Booth
c23506f453
Moved contact.c
2016-07-24 14:55:32 +01:00
James Booth
25a6252a28
Moved chat_session.c
2016-07-24 14:23:55 +01:00
James Booth
0649aad80d
Move event timeout to connection module
2016-07-24 14:08:30 +01:00
James Booth
5f393a6d9f
Remove plugin window on /close
2016-07-12 02:16:12 +01:00
James Booth
3fe1d76a05
Unit test for callback_add_command()
2016-07-04 21:10:11 +01:00
James Booth
71879a3f64
Free plugins commands on quit
2016-07-04 00:41:29 +01:00
James Booth
29eb843d56
Revert "WIP - Unload plugin commands"
...
This reverts commit a01eb5d08e
.
2016-06-30 22:37:52 +01:00
James Booth
a01eb5d08e
WIP - Unload plugin commands
2016-06-29 23:35:57 +01:00
James Booth
383e601f25
Move /statuses options to /presence command
2016-05-31 23:21:19 +01:00
James Booth
6559263b2f
Option to bookmark room invites
...
issue #813
2016-05-23 23:53:44 +01:00
James Booth
fb34785566
Rename command sources
2016-05-22 23:59:52 +01:00
James Booth
eaf2901b01
Add cmd_autocomplete.c
2016-05-20 00:19:03 +01:00
James Booth
3d20c85ada
Remove JABBER_STARTED, JABBER_UNDEFINED connection states
2016-05-10 23:18:11 +01:00
James Booth
6ce8edc194
Move disco info struct to connection
2016-05-07 23:28:16 +01:00
James Booth
81e95966cf
Remove redundant tls secured function
2016-05-06 02:18:31 +01:00
James Booth
579d062063
Move send stanza function
2016-05-06 01:51:58 +01:00
James Booth
b6c4a2029f
Move conn is secure function
2016-05-06 01:49:27 +01:00
James Booth
8950dbb768
Move tls peer cert function
2016-05-06 01:47:19 +01:00