Commit 2cd6c2f7 authored by Matthieu Tanon's avatar Matthieu Tanon
Browse files

Check PeerDeviceStatus of recipients before encrypting message

parent 9d3bac56
......@@ -159,12 +159,17 @@ ChatMessageModifier::Result LimeV2::processOutgoingMessage (const shared_ptr<Cha
}
}
// TODO the PeerDeviceStatus of recipients could be tested here and the unsafe ones removed
// Check PeerDeviceStatus of message recipients before encrypting the message
for (const auto &recipient : *recipients) {
if (belleSipLimeManager->get_peerDeviceStatus(recipient.deviceId) == lime::PeerDeviceStatus::unsafe) {
lWarning() << "Sending encrypted message to a chatroom with unsafe participant devices" << endl;
}
}
// TODO add policies to adapt behaviour when multiple devices
if (tooManyDevices) {
// If too many devices for a participant, throw a local security alert event
lWarning() << "Sending encrypted message to multidevice participant";
lWarning() << "Sending encrypted message to multidevice participant, message rejected";
ConferenceSecurityEvent::SecurityAlertType securityAlertType = ConferenceSecurityEvent::SecurityAlertType::MultideviceParticipant;
IdentityAddress noFaultyDevice;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment