Commit 2ec2f603 authored by Matthieu Tanon's avatar Matthieu Tanon

Allow creation of ConferenceSecurityEvent without faultyDevice

parent 72ddd774
......@@ -175,8 +175,7 @@ ChatMessageModifier::Result LimeV2::processOutgoingMessage (const shared_ptr<Cha
lWarning() << "Sending encrypted message to multidevice participant, message rejected";
ConferenceSecurityEvent::SecurityAlertType securityAlertType = ConferenceSecurityEvent::SecurityAlertType::MultideviceParticipant;
IdentityAddress noFaultyDevice;
shared_ptr<ConferenceSecurityEvent> securityEvent = make_shared<ConferenceSecurityEvent>(time(nullptr), chatRoom->getConferenceId(), securityAlertType, noFaultyDevice);
shared_ptr<ConferenceSecurityEvent> securityEvent = make_shared<ConferenceSecurityEvent>(time(nullptr), chatRoom->getConferenceId(), securityAlertType);
shared_ptr<ClientGroupChatRoom> confListener = static_pointer_cast<ClientGroupChatRoom>(chatRoom);
confListener->onSecurityAlert(securityEvent);
......
......@@ -40,7 +40,7 @@ ConferenceSecurityEvent::ConferenceSecurityEvent (
time_t creationTime,
const ConferenceId &conferenceId,
SecurityAlertType securityAlertType,
IdentityAddress faultyDevice
const IdentityAddress &faultyDevice
) : ConferenceEvent(
*new ConferenceSecurityEventPrivate,
Type::ConferenceSecurityAlert,
......@@ -52,12 +52,26 @@ ConferenceSecurityEvent::ConferenceSecurityEvent (
d->faultyDevice = faultyDevice;
}
ConferenceSecurityEvent::ConferenceSecurityEvent (
time_t creationTime,
const ConferenceId &conferenceId,
SecurityAlertType securityAlertType
) : ConferenceEvent(
*new ConferenceSecurityEventPrivate,
Type::ConferenceSecurityAlert,
creationTime,
conferenceId
) {
L_D();
d->securityAlertType = securityAlertType;
}
ConferenceSecurityEvent::SecurityAlertType ConferenceSecurityEvent::getSecurityAlertType () const {
L_D();
return d->securityAlertType;
}
const IdentityAddress ConferenceSecurityEvent::getFaultyDevice () const {
const IdentityAddress &ConferenceSecurityEvent::getFaultyDevice () const {
L_D();
return d->faultyDevice;
}
......
......@@ -48,11 +48,17 @@ public:
time_t creationTime,
const ConferenceId &conferenceId,
SecurityAlertType securityAlertType,
IdentityAddress faultyDevice
const IdentityAddress &faultyDevice
);
ConferenceSecurityEvent (
time_t creationTime,
const ConferenceId &conferenceId,
SecurityAlertType securityAlertType
);
SecurityAlertType getSecurityAlertType () const;
const IdentityAddress getFaultyDevice () const;
const IdentityAddress &getFaultyDevice () const;
private:
L_DECLARE_PRIVATE(ConferenceSecurityEvent);
......
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