Fix encrypted thumbnails

This commit is contained in:
Nicolas Werner 2023-03-22 21:01:31 +01:00
parent 50314bd2dd
commit 3f27a45ef2
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -103,7 +103,7 @@ struct EventThumbnailFile
template<class T> template<class T>
std::optional<mtx::crypto::EncryptedFile> operator()(const mtx::events::Event<T> &e) std::optional<mtx::crypto::EncryptedFile> operator()(const mtx::events::Event<T> &e)
{ {
if constexpr (requires { T::thumbnail_file; }) if constexpr (requires { e.content.info.thumbnail_file; })
return e.content.info.thumbnail_file; return e.content.info.thumbnail_file;
return std::nullopt; return std::nullopt;
} }