Commit 499b1955 authored by Sébastien Blin's avatar Sébastien Blin

behaviorcontroller: pass convId to request

As we slowly move towards conversation's requests. Only the
conversation's id will be necessary.
Also simplify code for notifications client-side.

Change-Id: Iaff595205458db090839af3755570a3ff5bf2013
GitLab: jami-client-qt#455
parent 4e95aae8
......@@ -72,7 +72,7 @@ Q_SIGNALS:
/**
* Emitted when the client receives a new trust request
*/
void newTrustRequest(const QString& accountId, const QString& contactUri) const;
void newTrustRequest(const QString& accountId, const QString& conversationId, const QString& contactUri) const;
/**
* Emitted when a trust request has been accepted, refused or blocked
*/
......
......@@ -995,7 +995,7 @@ ContactModelPimpl::slotIncomingContactRequest(const QString& accountId,
}
emit linked.incomingContactRequest(contactUri);
if (emitTrust) {
emit behaviorController.newTrustRequest(linked.owner.id, contactUri);
emit behaviorController.newTrustRequest(linked.owner.id, conversationId, contactUri);
}
}
......@@ -1028,7 +1028,7 @@ ContactModelPimpl::slotIncomingCall(const QString& fromId,
if (linked.owner.profileInfo.type == profile::Type::SIP)
emit linked.contactAdded(fromId);
else if (linked.owner.profileInfo.type == profile::Type::JAMI)
emit behaviorController.newTrustRequest(linked.owner.id, fromId);
emit behaviorController.newTrustRequest(linked.owner.id, "", fromId);
} else
emit linked.profileUpdated(fromId);
......@@ -1068,7 +1068,7 @@ ContactModelPimpl::slotNewAccountMessage(const QString& accountId,
}
}
if (emitNewTrust) {
emit behaviorController.newTrustRequest(linked.owner.id, peerId);
emit behaviorController.newTrustRequest(linked.owner.id, "", peerId);
}
emit linked.newAccountMessage(accountId, peerId2, msgId, payloads);
}
......@@ -1149,7 +1149,7 @@ ContactModelPimpl::slotNewAccountTransfer(const QString& fileId, datatransfer::I
}
}
if (emitNewTrust) {
emit behaviorController.newTrustRequest(linked.owner.id, info.peerUri);
emit behaviorController.newTrustRequest(linked.owner.id, "", info.peerUri);
}
emit linked.newAccountTransfer(fileId, info);
......
......@@ -505,8 +505,6 @@ NewCallModel::toggleMedia(const QString& callId, const NewCallModel::Media media
{
if (!hasCall(callId))
return;
auto& call = pimpl_->calls[callId];
auto mediaLabel = media == NewCallModel::Media::VIDEO ? "video_0" : "audio_0";
requestMediaChange(callId, mediaLabel);
}
......
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