Check if enclosureLink starts with https://www.youtube.com/v/ if enclosureMime is empty. Avoid appending an empty png enclosure. (#832)

This commit is contained in:
ExSign 2022-11-04 11:06:00 +01:00 committed by GitHub
parent 46ce39266f
commit b4c33839d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -614,7 +614,9 @@ QList<Message> OwnCloudGetMessagesResponse::messages() const {
enclosure.m_mimeType = QSL("image/png");
}
msg.m_enclosures.append(enclosure);
if (!message_map[QSL("enclosureMime")].toString().isEmpty() || !enclosure_link.startsWith(QSL("https://www.youtube.com/v/"))) {
msg.m_enclosures.append(enclosure);
}
}
msg.m_feedId = message_map[QSL("feedId")].toVariant().toString();