fix: use backend covers for recommendations
This commit is contained in:
@@ -23,10 +23,10 @@ function inferType(post: Post, att: Attachment | undefined): string {
|
||||
|
||||
function coverFor(att: Attachment | undefined) {
|
||||
if (!att) return "";
|
||||
if (att.kind === "image") return att.thumbnailUrl || att.url;
|
||||
if (att.kind === "video") return att.posterUrl || att.thumbnailUrl || "";
|
||||
if (att.mime.startsWith("image/")) return att.thumbnailUrl || att.url;
|
||||
return "";
|
||||
if (att.kind === "image" || att.mime.startsWith("image/")) {
|
||||
return att.thumbnailUrl || att.url;
|
||||
}
|
||||
return att.posterUrl || att.thumbnailUrl || "";
|
||||
}
|
||||
|
||||
export function postToResource(
|
||||
|
||||
Reference in New Issue
Block a user