1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

chatview: make participant avatars available in the webview

Gitlab: #492
Change-Id: Ia9df04b26d80b9178993d73bb6ec3f8d187178f9
This commit is contained in:
Andreas Traczyk 2021-08-16 13:10:14 -04:00 committed by Sébastien Blin
parent 47c8f6014e
commit 53b5add8e7

View file

@ -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