Commit Graph

16091 Commits

Author SHA1 Message Date
7670be4ca5 account_config: fix defaultModerators serialization
when unserialized, the default moderators is always empty

Change-Id: Ie23af56bfcae7de2895ea242df10cc0f926b659e
2023-07-07 14:49:06 -04:00
e8b1209b3d misc: fix some build warning and add ut_bootstrap to CMakeLists
Change-Id: I114a876bf6becacac00eec362a4481f3b0de6494
2023-07-05 11:56:04 -04:00
498b6d0664 cmake: don't force build directory
Change-Id: If7d6d751be7323a85210773463667cb3a89ac97f
2023-07-05 10:14:13 -04:00
41e2de1738 conversation_module: avoid useless removeRepository if already erased
Do not call removeRepository/saveConvInfos if conversation is already
erased.

Change-Id: I8f7907819cd76f5e9dd2f0f484d70ab850282108
2023-07-04 13:35:32 -04:00
edebe17139 connectionmanager: prevent JamiAccount usage
GitLab: #778
Change-Id: I5e7eb072ebda81c4ae45316cc46842dafdeaad13
2023-06-29 08:05:22 -04:00
7c7c1d38c3 conversationrepository: pin issuer certificate if needed
GitLab: #868
Change-Id: I2217c9321bc669ba454b54e5b26653399c4939a0
2023-06-29 08:05:15 -04:00
2c32cacda2 swarm-call: fix audio binding
Else the conference audio is not binded, and participants can only
listen to the host

Change-Id: I42075c2c5d5cb572efc8e679337f324cb39843b5
2023-06-28 12:10:58 -04:00
12288b33c7 contrib: update opendht
Change-Id: I179d5aeec42ffc6c224c12aecb097338d3aced82
2023-06-28 11:27:35 -04:00
2670d849fb misc: avoid nullptr exception
Change-Id: Ib75747a2c10ce191d005ca55a1f919423c4b1252
2023-06-27 11:42:13 -04:00
0d7e506bea data_transfer: remove invalid file if larger than requested
Else, we will result in a forever downloading file

Change-Id: If25dc48e5fffaea04c82c2a0c9e7b00933ac58ec
2023-06-26 15:28:26 -04:00
c2c178171e conversation_module: generate a trust request on 1:1 conv request
If Alice removes Bob and Bob sends a new message, a new request
is received (because Alice doesn't block Bob). However, the
next acceptConversationRequest was not adding correctly Bob into the
contact list, because no trust request were generated (so getContacts()
in this case was returning an invalid list).
This patch ensure that the 1:1 conversation requests are similar to
the trust requests list.

Change-Id: I643d70a016ef549d69ff03a227488b10bfb8d73f
2023-06-26 15:03:34 -04:00
eb1c4651a5 WhiteLabeling: Store incoming UI configuration in account details
Change-Id: Iadacc6e9b00a52b80c78ac4c942b274596a25ed0
2023-06-25 08:46:39 -04:00
c49072951c converations: prevent deadlock
The conversation requests doesn't need to be locked when getting trust requests and may provoke a deadlock.

Gitlab: #864
Change-Id: I64e11a9ef1343f51785479f2b577fffa8ebfbf7c
2023-06-22 16:22:51 -04:00
1598fb2fe6 cmake: make ASIO_STANDALONE and MSGPACK_NO_BOOST public definitions
Avoids users to try using BOOST.

Change-Id: Id54daee8d187979ee2e96cb07a053ebd85baa3ed
2023-06-22 16:20:02 -04:00
c931e18444 account_manager: avoid useless log if cert or key is absent
Change-Id: I81925d7e8bd0e5dcbc58bcd8771526028657c99e
2023-06-22 09:07:33 -04:00
c87d8c5f8e conversation_module: fix decline request on removeContact
erase is ok if conversation is accepted, not removed, else it cannot
be synced with other devices

Change-Id: Ia5425cb8d0dbe635b2d7db3a45de6d6b9683100d
2023-06-22 08:25:38 -04:00
6fcc02ba30 sync_module: sync contact list on JAMS accounts
ServerAccountManager didn't implement any onSyncDatas, causing
contacts to not sync across devices.
Also small fix: do not try to clone conversation already, it was
adding a useless log.

Change-Id: I494ee75ee0313c05056ee83ddcb8d9be500f593a
2023-06-22 08:06:51 -04:00
74a070f5dd conversation_module: only decline if request is not found
Change-Id: If0450e78cefb1f850aca529a5dbfd80b139c9489
2023-06-21 13:29:01 -04:00
0ec1d2e353 build/cmake: add unit tests
Change-Id: Id239a17a9d601ac4cae074c9fb83102bfde7a6c7
2023-06-20 14:36:37 -04:00
417447a167 conversationrepository: pin certificates if not already in cert store
An account can try to connect to a device that the presence was never
yet detected on the DHT but can use the public key from the repository.
Bootstrap can use devices from the repository.
Moreover, do not try to bootstrap with expired devices, as they are
invalid anyway, so the connection will obviously fail.

Change-Id: I5493419681e88fa3f920efabb0ab7019319c05fd
2023-06-16 15:00:22 -04:00
eb62840618 conversation_module: loadConversations should set removing flag
This fix the error "No conversation detected for..."

Change-Id: I95769b89ceac6c03bc8abab87978e154500a6319
2023-06-16 15:00:19 -04:00
589d1bc2de conversation_module: avoid two one to one requests
This allow to avoid to get a duplicate if a contact is added,
removed and re-added (as it will generate two conversations).
The first one is automatically declined and replaced by the new one.

GitLab: #855
Change-Id: I67d51d2286aaee3b29c9e9bdbcb10aa45f40aa26
2023-06-16 12:15:24 -04:00
5bf8188d69 fix error in building daemon for iOS audio layer
Change-Id: I8926afa1e36352264ce2450c248c2c498ba2a0cf
2023-06-15 17:41:03 -04:00
b86d822996 audio: remove usage of AudioBuffer on macOS
Change-Id: Ib5e9798673fc7877f4fe12ac419acb3be1b1dde8
2023-06-15 11:28:59 -04:00
439e6f24cf contact_list: force removeContact to update all components
If a contact is added, removed and a new trust request generated
and removed with "removeContact" it wasn't removing the trust request
because the contact wasn't considered as active and the banned status
didn't change.
Removing this return condition force all components to update and
supports client if they use removeContact instead of declineTrustRequest.
This avoid useless complexity with isActive, because if isActive() is
false, removeContact will not change the result and isActive() will
still return false.

A test is added.

GitLab: #855
Change-Id: I4385c2a480f6cfa5de3785a08bc2193eeb9a24a1
2023-06-15 10:53:07 -04:00
fa330fe882 dbus: stop daemon when last instance detached
+ dbusinstance: count_ can be initialized to something else than 0
causing count_ to always be incorrect
+ ring_api: check pointer for ioContext() (because a callback may
be emitted right after ioContext() is resetted causing to end
on a segfault instead exit=0)

GitLab: #861
Change-Id: If0d798aaa2ce7d65426d902868627bd701652375
2023-06-15 09:31:00 -04:00
632ec7e344 conversation_module: try to clone requests on bootstrap
Since the DRT, we're not using trackPresence to start syncing
with other members of the conversation but "bootstrap".
For bootstraping conversation's requests we should try to clone
it with the members marked in the convInfo.

Also fix one incorrect test.

Change-Id: I8cbefe266c15c637ef23350220a71a616ddefab6
2023-06-14 15:42:08 -04:00
560c70d6aa build/cmake: allow to build with hardware acceleration support
Change-Id: Ie525f767ab3985e54be6420bd3d3346b040d487b
2023-06-13 15:12:48 -04:00
e73fbc9630 AudioFormat: use av_get_bytes_per_sample instead of hardcoded size
Change-Id: I915fe38db6547425cdccc516d05ebd9afcdb3aac
2023-06-13 12:58:18 -04:00
e6a861249a audiolayer: stop using AudioBuffer
Change-Id: I72f04851b56d37a9264b78c10c0819e48712c6f9
2023-06-09 23:55:16 -04:00
a9ebdd6db1 audio: remove unused dcblocker
Change-Id: I1c4b30bee4cac1767b53353799ac819faf95a9cb
2023-06-09 23:54:57 -04:00
d3fe2b9849 Revert "conversation_module: try to clone requests on bootstrap"
This reverts commit 65c8631975.

Reason for revert: I see only this commit that can cause duplicates to appears. Will check without

Change-Id: I3a36a59fb87c8cddaa7c9020112efabe9073a041
2023-06-09 14:57:26 -04:00
dd35e705bf tests: fix ut_conversation_call
The fallback can take up to 30 seconds, so wait a bit longer

Change-Id: I357ef48a43873396e575f70c2a1c391df8f5a655
2023-06-09 13:57:24 -04:00
22d5417da3 connectionmanager: do not cancel all waiting channel if first is declined
For a declined channel, onReady wasn't called. Only onShutdown()
causing all waiting callbacks to be declined if the connecting
channel was declined.
Now onReady is always called if channel is declined or accepted,
so we call all callbacks correctly. This fix sporadic failures
in testMultipleChannelsOneDeclined where the git channel was
declined as the connecting channel.

Change-Id: I0ff7550c2f35cbcf20aaf796d56badfb18bec515
2023-06-09 11:14:33 -04:00
90ee6bf8a9 conversation: emit signal when conversation cloned
Currently, when a contact accepts an invitation while
iOS is in the background, the extension stops the
daemon before synchronization is completed. This
patch allows the client-ios to know when the fetch
is completed, so it can wait until the conversation
is cloned.

GitLab: #776
Change-Id: I123f3ca94c1cece1138db09d536f48e6533cf78f
2023-06-09 10:16:12 -04:00
65c8631975 conversation_module: try to clone requests on bootstrap
Since the DRT, we're not using trackPresence to start syncing
with other members of the conversation but "bootstrap".
For bootstraping conversation's requests we should try to clone
it with the members marked in the convInfo.

Change-Id: I4095ee59d56a28c4a24f8f4ddd9116109e6d0b7c
2023-06-08 11:55:47 -04:00
2a4149eb68 conversation_module: bootstrap after join
Else we can replace the first notification to send and create
some weird race-conditions. Fix testMemberBanNoBadFile

Change-Id: I5b902cf67fe5647faaef7801ad6ce380cd801c78
2023-06-07 15:27:36 -04:00
79e0e6a864 misc: fix typo
Change-Id: If56a102c1861b762623acdbe11358b0bc85085c5
2023-06-07 14:36:46 -04:00
f77182eb79 misc: fix testMergeAfterMigration
Due to certStore changes, we should force the certificate pinning
after forceReloadAccount

Change-Id: I1a98f86847607e9c48b91b5448185e3d25763a49
2023-06-07 14:35:39 -04:00
af3c2229c0 connectionmanager: close all pending callback if all connections fails
If all pending connections fails, it should remove all waiting callbacks
and not only the connecting one.
So, introduce a structure to make the difference between PendingCb linked
to a ongoing DHT request and others waiting for the request to finish.
If all ongoing requests fails, all waiting callbacks are called. This
avoid wrong "Already connecting" messages.

Change-Id: I518f1ef85294f55f78d1b75638b1612c68ea0a0a
2023-06-07 09:24:23 -04:00
c814c4de0a misc: remove USE_STD_FILESYSTEM
We're in 2023 and supporting c++17, every supported compiler should
have correct headers.

Change-Id: I81bda5df7a54a0943529d37d20e2852c651c8c6b
2023-06-05 16:28:50 -04:00
20d6437f86 fileTransfer: copy file if both hard and softlink failed
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/681
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/880
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/908

Change-Id: Idcf20c821cf0b619d9ee6ccfcaf3ba153622a679
2023-06-05 16:28:50 -04:00
e3480ca58a audio: enable agc by default
Change-Id: I4fe092e978d77213ebf29fea9d2a256bd1954d6c
2023-06-02 14:41:06 -04:00
9769e002a3 plugins: use daemon as submodule of plugins
GitLab: https://git.jami.net/savoirfairelinux/jami-plugins/-/issues/38
Change-Id: I42b4f25460285a677a226671bf85e0c1039e7c37
2023-06-02 11:31:16 -03:00
6c7042e133 connectionmanager: catch exception if initIceInstance throws
Change-Id: Id84e465996138a16aa425dde37baa389240f4221
2023-06-01 15:13:42 -04:00
e4cca14861 sdbus-cpp: emit signal on io queue
Else, we can see several deadlock (closeVideoInput() will wait
forever, because a signal is emitted before the method is finished
causing a deadlock in sdbus-cpp)

Change-Id: I87d5a5d51e80f3b75e60354595f8c618def361ff
2023-06-01 14:12:18 -04:00
c83a427001 meson: fix build definition
Change-Id: I50749a002936da4159be9479f256aa45fce64221
2023-05-31 12:07:13 +03:00
3dd5f4ebfd dbus: use sdbus-c++ for dbus communications
Change-Id: If10740b4fd192a1043c5f83adc9072fe67df7862
2023-05-29 11:57:03 -04:00
2eea2ce34d conversation_module: check swarmManager
Change-Id: I4627179aefe44e7cc0720c28076f70d2aaf17b0c
2023-05-26 17:07:28 -04:00
d615d2ae07 certstore: fix incorrect certificate in getCertificateLegacy
Else, passing the path and not the content of the file will cause:
Could not read certificate - ASN1: error in TAG

Change-Id: I2db356d1ccf8d3b059072cc14e64df8369f84e77
2023-05-26 15:34:44 -04:00