In some cases, the infos were not correctly refreshed, causing some
pending callbacks to never be called.
Also, split getInfo() in two methods to improve readability.
Change-Id: I1b60f2cf2ac5bf97c9a44a53794b56906d314e6a
GitLab: #TODO
Merge's commits were'nt checked, while comitting and while pulling.
This means that the author could be incorrect. Add a check before
doing a merge commit and when validating it.
This avoid incorrect repository in case a merge commit is generated
after a migration.
Misc: fix incorrect test
GitLab: #738
Change-Id: Id9748eb7d3dd5db023dd2ab4a30261c31af5d514
This patch fixes several behaviours:
+ Banning a member now stores the previous state of the member
+ This allow to store empty .crt files for invited
+ Unbanning a member is now possible for an admin
+ This re-add the member in its previous state
https://git.jami.net/savoirfairelinux/jami-product-backlog/-/issues/51
Change-Id: I34d5913c023043e07544f1b8bb6211aea5db0065
The agent and unit tests can now be compiled without requiring
`--disable-shared' at configuration time.
The agent requires the logger functions to have default visibility instead of
hidden. Thus, `jami::logger::[v]log' can be considered part of the public API.
The unit tests however require hidden symbols. Thus, we link the tests against
a static version of libjami instead.
Change-Id: I59d9e67679766e0310a19f9a879c06a31c5124c4
Mute/un-mute audio is done only locally, i.e. without requesting
a media change (re-invite) as done for the video, thus the media
direction in the SDP must not change for the audio stream.
Gitlab: #688
Change-Id: I3775a29f6c566a159d5b9269b4d9462ab4e3c36f
membersUris() didn't remove banned members from the list by default,
causing the daemon to send messages to banned members.
Change-Id: I84a80476d36d27ec33379b6e8be38f317322ec3b
GitLab: #298
In some cases, a user in the swarm can update its certificates.
However, the new certificate MUST be checked and MUST be signed
by the account.
So, this patch validates two scenarios:
+ Check that a fetch error is sent to the client whenever an invalid
certificate is detected in the original clone
+ Check that a fetch error is sent to the client whenever a
certificate is replaced during the conversation.
Change-Id: Ieb15fb6444dcf4541f00c511a9f4ba0c64617130
If a device expires, a migration will regenerate the device's
certificate. In this case, the device certificate in swarms must
be updated.
So, the idea of this patch is to verify that the current certificate
in the repository for this device is still correct. If the device or
the member got invalidated, it tries to replace the current certificate
(updated via the migration). So that the new commits will still be valid.
Change-Id: I75b19b0edbb5601a758a73a4c4a44678d77295e1
GitLab: #684
On older versions, removeConversation didn't update appdata/contacts
causing some removed conversations to be announced in contacts details.
On Android, this hide the contact from the smartlist, as it's waiting
for a removed conversation.
Change-Id: I05be12ffcd2e5fe38d84c6f972b97e082c612ac7
GitLab: #714
When a device is expired, the migration will update the certificate
chain with the previous key. So, after a migration, the device's id
must be unchanged.
However, if a device is revoked, this should trigger a re-generation
of the device with a new PrivateKey (so generates a new device).
Add related unit tests.
GitLab: #684 (this is some preparative work)
Change-Id: I7ff0cff97b7285186539cfadc6e33b620ded5b27
+ testSetMessageDisplayed and testSetMessageDisplayedPreference were
broken because the lastDisplayed behaviour was recently changed to
support syncing across devices. Update the two related tests. Also,
avoid to update the lastDisplayed on merge
+ testSyncWithoutPinnedCert was badly written causing some sporadic
failures.
Change-Id: I364818b4ececb0fa63e87441f55a7da76fe1feb6
Small helpers for signal handling.
`with-signal-handler` is useful for scoping signal handler and
`with-signal-handler-sync` for signal synchronization.
Change-Id: Idc7696fb273003d526f3a4658e7fb5623c2c5827
Because swarm is a synched history compatible with multi-devices,
if a message from the swarm is read on one device it should be
synchronized with other devices as much as possible.
The idea of this patch is to add lastDisplayed sent in synched
datas to allow clients to update the read status. However, there
is several scenarios to take into account, because the history
can be partially synched across devices.
5 scenarios are supported:
+ if the last displayed sent by other devices is the same as the
current one, there is nothing to do.
+ if there is no last displayed for the current device, the remote
displayed message is used.
+ if the remote last displayed is not present in the repo, it means
that the commit will be fetched later, so cache the result
+ if the remote is already fetched, we check that the local last
displayed is before in the history to replace it
+ Finally if a message is announced from the same author, it means
that we need to update the last displayed.
If the last displayed message is updated, AccountMessageStatusChanged
is triggered for the client.
Doc: https://git.jami.net/savoirfairelinux/jami-project/-/wikis/technical/2.3.%20Swarm
Change-Id: Iedd29129d72cbeb43499471bdfd492dd4d49dcb6
Accounts can see their certificates expire. When it's the case, a
migration is needed. However, several regressions can happen, because
this behaviour can be tricky to test correctly. In this patch, a
test is added to validate that the migration is done whenever the
certificate expires.
+ OpenDHT needs to be bumped in order to be able to change the validity
period of a certificate.
+ In ArchiveAccountManager, a method is added to change the validity
of a certificate in the chain.
+ This patch also fixes a crash when a migration occurs directly on
the archive (info_ was null causing a segfault).
+ Finally, cleanup some signatures unused in JamiAccount.
GitLab: #684 (this is some preparative work)
Change-Id: I901bc67fd63ce2ab26ded64662f8333d3a0eed50
The method was bugguy, because the whole point here is to check
if the conversation contains enough informations at this point to
validate the user, not to compare with pinned certificate.
Moreover, a user can sync the history from another device, without
ever connecting to the original author, so the certificateStore
will not have the device certificate in this case, so only uses
from the repository.
A test is added to reflect this.
Change-Id: I3af5e7769174eedcb54e17181d4530593960c9c9
When muting/un-muting the video, a re-invite is performed
leading to a full media renegotiation and restart, including
ICE session if used.
With these changes, the mute/unmute video will still require
a re-invite (a new SDP to indicate the new media directions), but
the ICE session is re-used and only the video is stopped/started
accordingly.
The behavior improves the UX by avoiding unnecessary audio disruptions
and is more compliant with SIP/ICE specs (see RFC-5245 section 9.1.1.1
for example)
Gitlab: #671
Change-Id: I13caf9a965af1d76e922fe5f6b86d5332b3296d6
GOOPS is Guile Object Oriented Programming System.
It's easier to extend and break less the scenarios using GOOPS. e.g., a
scenario published on Gitlab should work two weeks later. This is not the case
right now and the goal of using GOOPS is to offer a stable API for the agent,
while keeping it flexible.
Change-Id: If6a038b6d8c371f8e74849749770f1dec8559b91
Currently, the media attribute in the SDP is always set to
'sendrecv' regardless of the mute state of the media.
In this patch, media direction will be set according to mute
state of the media.
Note that this only applies if the mute/unmute requires media
renegotiation (SIP re-invite with new SDP session). Currently,
this only the case for video media. For audio, mute/unmute is
done locally without SIP re-invite.
References:
RFC-3264
RFC-4317 (non-normative)
Gitlab: #645
Change-Id: I604331255bd25dfe732e192039a673a0980105fa
This patch fix 3 little issues:
+ "device" was always empty. Uses the transport to fill the device
field. This will be used in the next version of the protocol.
+ raiseHand was bugguy in two ways:
+ It was only usable by moderators
+ Somebody was able to change the raiseHand for other peers
Change-Id: I32bf37c5063973a5a5962dd8984c87fb05d33a3d
Because some callbacks can take a long time (accepting a SIP channel
will starts to sync profiles, ask for new channel, etc), control packets
are handled in their own thread. However, if the peer accepts a request,
it can starts to use it and send data on it. When finished, it will close
the socket and both peer will remove the channel.
In some case, the channel can be removed before
MultiplexedSocket::Impl::onAccept, causing upper layers to handle a
bad channel. In this patch, we removes the channel only when upper layers
know that the channel is accepted and ready to use. Also, onAccept()
doesn't create wrong channels (which was a bug, where isInitiator() was
in the wrong state).
GitLab: #659
Change-Id: I4f45feacc2624ce0135ace09f7e0188b56fcf81f
AcceptTrustRequest should update conversation's module to directly
return the syncing conversation. Moreover, configurationMutex_ should
be recursive to allow sync between trust and conversation's requests.
This fix ut_conversationRequest where the problem was that the
conversation's requests were updated after ContactAdded, causing
removeContact() to remove the conversation, but acceptTrustRequest
re-adds it during the operation.
Change-Id: If676dc58290f87c289a6e63eb9afa04d2cc25df5
GitLab: #659
This patch fixes current unitTest
+ Fix testCreateConversationWithMessagesThenAddDevice messageReceived
flag
+ Remove useless sleep in tests
+ in ut_conversation fix messageReceived flag
+ lock convInfo and convRequests to avoid invalid write operations
+ fix pending callbacks if connected via a DHT request
+ remove useless log
Change-Id: If53ecf0c064e9c1424c11a4af1e13d31294e6be9
The conference should be used in the tests after the first
conferenceChanged, to be sure that every calls are binded to the
conference.
Then, before adding a call to the conference, it should be CURRENT
from the host perspective, not the receiver. So, add "hostState"
to store the state of the call from the host perspective.
Change-Id: I9d27b4c0461ede05d27ea849de08c22e9fc3b249
This starts the work to move calls and conference per account,
cleaning up the API and start future re-factorization.
Change-Id: I2a3a2c77e9ba78b1a280bdf8dca7eeaabb72f3fd
This patch fix several problems:
+ participants_ must be protected and not iterated while accessed
+ getVideoMixer() do not generate a video mixer, this is only
managed at one place.
+ Remove setConfId, enter/exitConf are here for this and this
is causing the videoMixer to not be destroyed in time, because
exitConference() was called after setConfId(""). This was causing
crashes because the videoMixer will update for the last participant
with the error: "The call is not bound to any conference"
GitLab: #660
Change-Id: Ic60bc7377b0315f7e2906ab03a7653381436180c
If a contact is added, the first device will erase the trust request,
but the second device will update the contact but not the trust
request. Causing, the removeContact to generate a new request for
the previously created conversation.
Change-Id: I2f0a48b3c6b6b18ed6218e7a08c61de2beb08d3d
GitLab: #664
When a call is held, the media direction in the SDP
for an active media must be set to sendonly.
Also add unit test for simple hold/resume operations
Gitlab: #644
Change-Id: Ib41434c55f9be1a6d34a7d51c9127af89081c8e8