609 Commits

Author SHA1 Message Date
16b77dd10c remove mutex template
Change-Id: I0aacf47c70a0de4fcd1a68f6688cf0ee0c551934
2024-03-04 10:38:00 -05:00
fab9009a1c conversation: improve typers management
Now, a client should not do any logic and not store preferences
client side.
+ When a member is removed while banned, the typing indication
is updated
+ Timeout is computed both for sender and receiver
+ Sending and receiving a composing status is managed by the
account's config.

GitLab: #951
Change-Id: Iba9441736eec4f71695bfbd609d4b9e8b6adcb73
2024-02-28 09:04:27 -05:00
dfcc8f993e swarm: fix some syncing with removing/re-adding
This should fix sporadic failured in ut_conversationMembersEvent

+ A banned member get a valid conversation still on the device.
+ Re-adding a contact updates the "removed" state
+ Avoid useless network operation if we're removing and fetching
at the same time

GitLab: #956
Change-Id: Ife3678d2ba35cb5ca61c8f22c64aa3400eae23d3
2024-02-27 15:20:11 -05:00
ff9e9bd4c3 conversationrequest: avoid to accept with a non-existing conversation
We recently changed getContactDetails() to get the removed state when
needed. However, getOneToOneConversation was now returning a removed
conversation causing the request to be ignored if both sides removed
them previously.

GitLab: #1619
Change-Id: Ie7464460609d6c1b6b3774318fb50116b7408f0a
2024-02-23 12:00:53 -05:00
a990b89836 tests: fix some sporadic failures
Use member event signal to check if a member is removed and avoid
merge id

Change-Id: Ifc18d5e12594bedf2f47bbc5d6d88a9c0dfbd6c7
2024-02-22 11:45:18 -05:00
61c97520e5 sipcall: commit reason of failure
This allow unit test to be able to check why a call is declined and
allow client to clarify messages for call messages

Change-Id: I37f8f1d1160910ca702010e4a9a40c9ecbcd13fd
2024-02-21 15:21:24 -05:00
f2075d9ca4 test: fix sporadic failures in ut_call
Change-Id: I65ca8d0fc907b8a4dea2cebe459ac67d0ba21f5d
2024-02-21 14:49:54 -05:00
78e3c5e880 test: remove ice_media_cand_exchange
There were no useful test as it duplicates test for ICE connectivity
and doesn't test media

Change-Id: Ifde558bf44bbd60911385760c209eb4ccab9dc12
2024-02-21 11:39:07 -05:00
c9bb7b1231 jamiaccount_config: avoid duplication of dht port and follow config
There was both "Account.dhtPort" and "DHT.port" in the config and
this was unused.

Change-Id: I5a21b20923e8d588e6be52eb9e89f40a46836890
2024-02-20 15:47:14 -05:00
1b189da3ae tests: add basic test for SIP account with credentials
Basically, the user must override the values in the config, will
be done via jenkins for our CI

Change-Id: I6908f116f194444ae76b2843cd5795e94342a922
2024-02-20 08:13:01 -05:00
842128f09b jamiaccount: redo presence design
Green indicator is not understandable for the majority of users.
This patch introduces a new approach to this status. API doesn't
change, so this is 100% backward compatible but introduces new
possibilities:

1. The status sent to the client is now 0=offline (no device found
on the DHT), 1=dht_presence (at least a device is found on the DHT),
2=connected (with a TCP + SIP channel, so ready to exchange data).
2. Publish can now be used on a Jami Account. Status is ignored,
but custom note can be added. e.g. "Lunch time!"
This status is sent via a PIDF XML status as described in RFC3863
(and already supported by SIP account) to connected peers (or for
future connections).

Several scenarios are tested in ut_presence

Change-Id: I87d987bc69e97f92a0c9f4751069e52ad69ea0fc
2024-02-19 14:03:28 -05:00
228a7ec3ad tests: fix ut_media_player
The test fails as this is not the current behaviour of MediaPlayer.
If this is considered as a behaviour we want, it should be done
and the test should be added at this point.

Change-Id: Ib3c76c72919e828b2be400095c24c474c2b1ce76
2024-02-19 10:07:30 -05:00
0cff95b45f tests: simplify ut_fileTransfer
Tests are the same, with 500 lines removed

Change-Id: I06ab061b3a92acf71f19734af8158554fff8309b
2024-02-16 09:20:59 -05:00
09ec8e6f43 conversation: re-design sending/sent status
The goal of this patch is to allow the clients to get a better
sent/read status from the daemon.

API doesn't change much, but internal logic got some changes. For the
client:
+ SwarmMessage now contains a map<string,int> status where string is the
  uri of a member, int is the status (0 = sending, 1 = sent, 2 = read)
+ cancelMessage is removed as not used anymore (sendMessage with flag=1
  will edit a message)
+ getMessageStatus is removed as the status is sent in the SwarmMessage
+ accountMessageStatusChanged is now emitted for swarm messages when a
  fetch or setDisplay occurs. Client must handle this signal correctly.
+ Previous code to manage last displayed, fetched status is now merged
  with message status
+ Sync info is done when the sync is opened, else status are not updated
  correctly

GitLab: #948
Change-Id: I60763d4de8a995c6fc9f6df6434e266211f8dc2f
2024-02-15 13:52:39 -05:00
66d8100264 misc: fix some sporadic failures in conversationMembersEvent
+ addConversationMember was called without any conv ready sometimes
+ call was mostly disabled
+ ban/unban was unclear sometimes

Change-Id: I4919ec70af128a5bf623405ba6840a8fafc45e8c
2024-02-13 14:29:18 -05:00
0a131c0a2f conversation: remove reactions on a message deletion
GitLab: #945
Change-Id: I23e32f33f405c7c6534b0d4667d3d27d8a045e77
2024-02-12 15:12:27 -05:00
8bf32a2320 test: scheduler: raise timeout from 3 to 30s
Change-Id: I75b8731152c9fa88b7317d3a0bfd39153b265d66
2024-02-09 14:37:42 -05:00
46f180e297 ut_conversationMembersEvent: little cleanup
Change-Id: I351016eecacd9357b4b0ad54adacbcd8d39f8731
2024-02-09 11:30:44 -05:00
205904ed4d sip: fix blind transfer
URI was illformed, scheme is intended. Now it works for both
jami and sip accounts

GitLab: #947
Change-Id: Ifc8d88be1cec91428dd8060c3c4e12efc55243f0
2024-01-25 14:13:01 -05:00
9ac6717a90 jamiaccount: init convModule for disabled accounts
Change-Id: Iec90e9d91f933531a96d4e84e6a3ed242caf1422
2024-01-25 08:54:13 -05:00
b122e248f3 conversationrepository: add user device on profile update
If the first interaction from a device in a conversation is a
profile update, the certificate was not added correctly causing
the conversation to be illformed

GitLab: #946
Change-Id: I07f1735639c2dbf89ba2b2e6b7d9c3f57e5823e4
2024-01-19 11:09:28 -05:00
8451a86070 jamiaccount_config: add dhtPublicInCalls
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1519
Change-Id: I728a7fa4b59d949c350949308af1aaf045043338
2024-01-15 13:49:21 -05:00
7fd1bac6c5 test: fix sporadic failures in testCacheRequestFromClient
Change-Id: I5139977d9d1fe49c9773ab3ad4a069ecf67ef637
2024-01-12 09:40:03 -05:00
340e4d0d6d test: fix callback crash
Change-Id: Ia6d5e2c8f211e5206dec214232c929e624c307de
2024-01-12 09:40:03 -05:00
7509382335 jamiaccount: remove too big payload for request
Because the encoded avatar can be greater than 64k, a SIP message
will fail, and the trust request may not be sent.

https: //git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1491
https: //git.jami.net/savoirfairelinux/jami-client-android/-/issues/1537
Change-Id: Ieba2db521a3c7e72890be75d3578f93e496dc968
2024-01-12 09:40:03 -05:00
6665114f65 test: fix sporadic failure in conversation_call
Change-Id: Ib7b61be24c94d79ef426a2c93021188b6dbae040
2024-01-12 09:40:03 -05:00
3c3370a6f1 test: add test for keeping reaction on edition
Change-Id: Ibeb67458e76cf413a53120fe3382bf625c7f0de8
2024-01-09 11:55:47 -05:00
2b14e50fe6 test: fix ut_routing_table
setKnownNodes is asynchronous, so the connecting nodes are added
after.

Change-Id: I87d41f65697f6d697c647d891eb254f9c53119ee
2024-01-03 12:52:16 -05:00
1ada7f7b56 misc: fix ut_migration, ut_revoke, ut_namedirectory
Change-Id: I98e2318c9774cc00af77d3f4bbc1d5149c13edc3
2024-01-03 10:00:10 -05:00
6addbbc160 misc: remove <std::mutex> template
Not needed in c++17

Change-Id: Icf3c7b7781dbf829db2770a750cf10ec8fbeef45
2024-01-03 08:37:46 -05:00
40dddee226 misc: update copyright to 2024
Change-Id: I829473d42b2b90f26ed2d93bbde063a21ce0952c
2024-01-02 17:26:29 -05:00
c1519ba4ec AccountArchive: allow to unlock with raw key instead of password
Change-Id: Ic8b28a32f64862ac2dfae074d06f4eac470ab7e1
2024-01-02 17:18:06 -05:00
8065504bb0 tests: fix testAddAcceptOfflineThenConnects
Change-Id: I0e0248d167af0e81cef828ef3c1e3746d974aaed
2024-01-02 12:11:41 -05:00
2364669831 tests: remove invalid tests
Sending a 1:1 message after a removeContact doesn't create a new
invite anymore

Change-Id: I0faf4a8134bb5d45672637364bd06fbbe6b20661
2023-12-28 16:05:40 -05:00
8468f15927 conversation: move logic of message management in daemon
This heavily changes the API for the client. The goal here is
to move the logic to construct the history to show in the daemon
and not the client. This has several advantages:

1. Logic is common across every platforms, so bugs should not be
platform-specific
2. Client got less logic
3. Signal are simplified, if an edition comes, "MessageUpdated"
will be triggered instead MessageReceived.
4. Some tests are added for linearizing the history.
5. Search on edition is fixed.

Tests got heavily re-written, but the content didn't change (2 tests
are added, the rest is simplification).

GitLab: #831
Change-Id: Ie7c81077067e9e49db1dd396829c9225c0512c16
2023-12-28 16:05:40 -05:00
1300db57be test: fix build for ut_routing_table ut_swarm_spread
Change-Id: I37eb0bc50ffcc29e65f74e29027a8307f525596a
2023-12-15 11:47:27 -05:00
057cb34917 conversation_module: parallelize loadConversations()
and avoid to call it twice

Change-Id: I75e7943a2552c1834f697a616b0c115955122abf
2023-12-14 23:10:26 -05:00
8b7afc852a swarm_manager: freely connect to nodes with a p2p link
setKnownNodes will add new nodes that may be already connected
with a TCP link, but maintainBuckets may not choose those nodes,
delaying the bootstrap.
If we detect a new node that we're already connected with, we can
add it in the list of nodes we want to connect with.

Change-Id: I422a32495693e1e2d925a3af127a4a59903c1833
2023-12-08 10:25:17 -05:00
e7245b1b31 test: fix build for test_media_player
Change-Id: I4f5ae81b391bda69c32ee3214e3fdef4b7cbfdb1
2023-12-04 15:28:45 -05:00
40c99f0549 tests: add test for audio file
Change-Id: Ie67ad8f18ef453dd7de8e3ef201d77e54843ca33
2023-12-04 13:26:48 -05:00
4392c72206 conversation_module: avoid double conversation for same contact
If we receive a conversation request for a contact where we
already have a conversation, we can just accept the new one.

GitLab: #924
Change-Id: I9e5d0f7302567ce488c52b45377117f034cd5da5
2023-11-28 13:25:54 -05:00
191396aa1b conversation_module: retry to sync if first connection fails
If first connection fails and presence is not tracked, the
conversation will not sync until the receiver restarts its jami,
causing the conversation to be stuck a very long time even if
peer is online and can sync.
In this patch, if we receives a trust request, we retry to sync
(this will be the case because the sender will re-send a trust
request to the contact who is still detected as an invited member)

GitLab: #922
Change-Id: I8866ceda98d50b0ddd2ea5402ef34f067f560e97
2023-11-22 15:15:53 -05:00
63172ddf16 PluginEnable: fix plugin load when first installation finish
Gitlab: #1382

Change-Id: Ie14258d453cb0f8c1e4c14a5ed473b57941c3b0e
2023-11-22 08:47:11 -05:00
1f4cd3d548 conference: improve audio-only handling
1. When a audio-only participant leaves, the video mixer is updated
and all audio-only streams are now removed.
2. If a audio-only calls try to join a swarm-call, it was hanging
due to a bad number of medias. So ignore video for audio-only calls.

GitLab: #917
Change-Id: Ifdd66e2ab138c078ef9e9c1402a07a6ae6a36b00
2023-11-17 11:24:11 -05:00
cc98f1d0e8 media_player: add ability to play images
JPG/PNG sharing in video calls is broken since we use the media
player to share all the files

Change-Id: Ib85e65405faf46e8b5ff7e4bc7d745af69b1f360
2023-11-17 11:18:20 -05:00
4e0e842a78 misc: fix testJoinAfterMuteHost
Change-Id: I6372066ec95fdd80d7e754946757a8dfdcbd38d6
2023-11-16 15:15:15 -05:00
a5a46c0385 filesharings: integrate audio stream
GitLab: #485
Change-Id: I0ae7c23da2a1f2384699639cc0de58f8f05b33ec
2023-11-01 11:02:32 -04:00
809600018b filesharing: use mediaplayer
GitLab: #485
Change-Id: Ie3f129cd0cee14a97764eb22ee2b5f530a3f3023
2023-11-01 11:02:32 -04:00
42cc4e03e0 unit-test: fix ut_syncHistory
Change-Id: I932ef0cfcae7336bf1319c46c2e5f29febe18df2
2023-10-25 13:07:40 -04:00
107787671b ut_conference: add participant addition mute state test
Change-Id: I11227e44e2cbb0b0671626c9ca0fe4949494b495
2023-10-24 09:28:14 -04:00