Add default banner to account

This commit is contained in:
Alex Gleason 2023-04-30 23:27:29 -05:00
parent 8b3eab80b3
commit e93fcdc643
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import { getAuthor } from './client.ts';
import { type Nip05, parseNip05 } from './utils.ts'; import { type Nip05, parseNip05 } from './utils.ts';
const DEFAULT_AVATAR = 'https://gleasonator.com/images/avi.png'; const DEFAULT_AVATAR = 'https://gleasonator.com/images/avi.png';
const DEFAULT_BANNER = 'https://gleasonator.com/images/banner.png';
function toAccount(event: Event<0>) { function toAccount(event: Event<0>) {
const { pubkey } = event; const { pubkey } = event;
@ -35,8 +36,8 @@ function toAccount(event: Event<0>) {
followers_count: 0, followers_count: 0,
following_count: 0, following_count: 0,
statuses_count: 0, statuses_count: 0,
header: banner, header: banner || DEFAULT_BANNER,
header_static: banner, header_static: banner || DEFAULT_BANNER,
locked: false, locked: false,
note: lodash.escape(about), note: lodash.escape(about),
fqn: parsed05?.handle || npub, fqn: parsed05?.handle || npub,