Skip to content
Snippets Groups Projects
Commit 53b5add8 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Sébastien Blin
Browse files

chatview: make participant avatars available in the webview

Gitlab: #492
Change-Id: Ia9df04b26d80b9178993d73bb6ec3f8d187178f9
parent 47c8f601
No related branches found
No related tags found
No related merge requests found
......@@ -330,19 +330,13 @@ MessagesAdapter::userIsComposing(bool isComposing)
void
MessagesAdapter::setConversationProfileData(const conversation::Info& convInfo)
{
auto& accInfo = lrcInstance_->getCurrentAccountInfo();
if (convInfo.participants.isEmpty()) {
return;
// make the all the participant avatars available within the web view
for (const auto& participant : convInfo.participants) {
QByteArray ba;
QBuffer bu(&ba);
Utils::conversationAvatar(lrcInstance_, convInfo.uid).save(&bu, "PNG");
setSenderImage(participant, QString::fromLocal8Bit(ba.toBase64()));
}
auto title = accInfo.conversationModel->title(convInfo.uid);
// make the conversation avatar available within the web view
auto avatar = Utils::conversationAvatar(lrcInstance_, convInfo.uid);
QByteArray ba;
QBuffer bu(&ba);
avatar.save(&bu, "PNG");
setSenderImage(title, QString::fromLocal8Bit(ba.toBase64()));
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment