Commit Graph

578 Commits

Author SHA1 Message Date
e31ca92b36 conversationrepository: cache account config
GitLab: #952
Change-Id: I50264953b3d1575cc323caf5348747f8b8a35313
2024-07-04 16:01:17 -04:00
b0a83e7f18 tests/fileTransfer: testTooLarge
GitLab: #972
Change-Id: Ic345e31ff51c9d51b50df0c911594e9d7f07ebbb
2024-06-12 11:17:24 -04:00
239d136788 jamiaccount: check if uri is valid before adding contact
Else, if a client calls addContact with an invalid uri, it will
create a conversation with an invalid contact and the client will
be in a bugguy state.

git.jami.net/savoirfairelinux/jami-client-android/-/issues/1681
Change-Id: Id6227c45c279c78aac0a191b6ae688ebe0d3d1c4
2024-05-31 10:24:12 -05:00
9098dfa624 tests: fix build on GCC 13.2 (Ubuntu 24.04)
Change-Id: I80fb049e0c4e70005c844deed1cf35ed868a2293
2024-05-30 10:25:52 -04:00
d9d9d08d04 conversation_module: support editMessage on file transfer
This allow users to delete files. Moreover, change edited type and
use edited commit type instead.

GitLab: #796
git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1287
Change-Id: Ida04c15cf1570de2f7707ce547be9f4a5e638245
2024-05-27 14:39:25 -05:00
d6cb4930d3 conference: fix tests and conference hangup
API changed for ut_conference.
For ut_conversation_call, because the host is not a dummy call,
we must change the hangup in manager.cpp and fix sink creation
for host while attaching.

Change-Id: Icfc296949438e92f7b9b986ed6aa3b463ec2334e
2024-05-24 09:44:21 -04:00
089a220626 conference: rename Participant into SubCall and merge bind/attach
GitLab: #958
Change-Id: I91036c9f1e20ee19e3896eb8e0110aa36a9d0602
2024-05-17 12:15:40 -04:00
a404577a9e call-swarm: avoid dummy call to create a conference
Now a conference can start without any call (this avoid to attach
a call without peer to create a conference).

Path is now clearer for a call creation:
+ If we receive a call, we attach it to the conference
+ Else we do not create any call and just attach the host.

Next step is to be able to attach a host in audio only without weird
tricks and group addParticipant/bindParticipant

GitLab: #953
Change-Id: I13785a5525e041c37fb62c0c9f355e9371f1e4ad
2024-05-17 12:14:16 -04:00
f2d8c57fc7 call-swarm: fix host attachment for audio-calls
Also, start to fix audio binding (this will be a full patch, but
at least do not attach host)

GitLab: #959
Change-Id: I0aeb9121e2880a5afb4b1ca1a30710d1b60a2e7e
2024-05-17 12:12:59 -04:00
07d673d0c7 conversationRepository: fix build with libgit 1.8.0
Change-Id: Ieede07472435b7f8ae0b19a0ec2afad94e195fee
2024-05-10 09:49:56 -04:00
d8efbc0213 misc: fix build for libgit > 1.8.0
Change-Id: I5576412901a12be74395823a6abf7954bbd72b73
2024-05-09 11:40:49 -04:00
d15b4f7961 test: remove certstore test and ice test from the daemon
certstore test and ice test are moved to DHTnet project.

Change-Id: Iefba61c36d5790df5753fefd97b0eaa40f15ad0d
2024-04-29 13:38:18 -05:00
54f149fc18 conversationrepository: protect operation
+ Avoid concurrent operations on same repository
+ Reset HEAD to always get a clean commit

GitLab: #931
Change-Id: If417c06934e2acab3382481718dc0bc46f40e3f9
2024-03-07 21:30:17 -05:00
b5bc77d665 conversation_module: keep metadatas while syncing
If a conversation is syncing, conv->infos() is not available and
there is no conversation request. So we must keep metadatas somewhere
to be able to show profile of a conversation while syncing

Change-Id: If68e8476f456ab13a5523193d67bb1212e1cb46a
2024-03-07 20:47:45 -05:00
bd2789d58b conversation: fix status loading if last message is displayed
If last message is displayed, the cache upgrade wasn't working because
we only checked from sending to sent, not sending to displayed and
status was lost after a reboot

Change-Id: I5d11e7560edf000e6fd9b8d3173d660baf0cc944
2024-03-06 11:21:23 -05:00
94205cbddf conversationMembersEvent: fix sporadic failures
Change-Id: I22affb5cc4e97b2a1b6137d1f6e52262fef5b788
2024-03-05 16:20:49 -05:00
6583436a37 test: fix ut_typers
GitLab: #968
Change-Id: I9049d376984d480f686a369237b8dcab29144f45
2024-03-05 12:13:03 -05:00
b307501a7b CTAD: re-add template when CTAD fails
In a class definition, the template deduction is failing.

Change-Id: If725c6a076fc4ac07ab0cf493959e51820abdc85
2024-03-05 08:39:02 -05:00
36925c0d94 conversation: avoid to get lastCommitId while merging
Change-Id: I2a7b7cc13268be127a6afe3d689d005b6596a3cd
2024-03-04 13:10:15 -05:00
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