Fixed missing avatars in comment section

This commit is contained in:
Jeffrey Phillips Freeman 2023-10-13 17:35:00 -04:00
parent 2b2cf72adc
commit 68adf5d1a2
No known key found for this signature in database
GPG key ID: AD914585C9406B6A
3 changed files with 5 additions and 3 deletions

View file

@ -6,6 +6,8 @@
* Created activity and status pages for each page independent from the outbox.
This should enable searches for specific posts to work rather than simply
pointing to the main user.
* In the comment section for a page if a user doesnt have a profile picture
setup it will now default to a generic avatar rather than render text.
## 1.0.1

View file

@ -117,7 +117,7 @@ export default async function (req: VercelRequest, res: VercelResponse) {
if (typeof actor == "string") {
return `<a href="${escapeHTML(actor)}" target="_parent" rel="nofollow">${escapeHTML(actor)}</a>`;
} else if (actor != undefined ) {
let actor_icon_url = "";
let actor_icon_url = "/images/missing_avatar.png";
if( actor.icon != undefined) {
actor_icon_url = actor.icon.url;
}
@ -135,7 +135,7 @@ export default async function (req: VercelRequest, res: VercelResponse) {
if (typeof actor == "string") {
return `<a href="${escapeHTML(actor)}" target="_parent" rel="nofollow">${escapeHTML(actor)}</a>`;
} else if (actor != undefined ) {
let actor_icon_url = "";
let actor_icon_url = "/images/missing_avatar.png";
if( actor.icon != undefined) {
actor_icon_url = actor.icon.url;
}
@ -153,7 +153,7 @@ export default async function (req: VercelRequest, res: VercelResponse) {
if (typeof actor == "string") {
return `<div><a href="${escapeHTML(actor)}" target="_parent" rel="nofollow">${escapeHTML(actor)}</a> wrote: <blockquote>${escapeHTML(stripHTML(object.content))}</blockquote></div>`;
} else if (actor != undefined ) {
let actor_icon_url = "";
let actor_icon_url = "/images/missing_avatar.png";
if( actor.icon != undefined) {
actor_icon_url = actor.icon.url;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB