Add default banner to account
This commit is contained in:
parent
8b3eab80b3
commit
e93fcdc643
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue