Update note.ts
This commit is contained in:
parent
f0998d0362
commit
18dec89355
1 changed files with 3 additions and 2 deletions
|
@ -320,14 +320,15 @@ export async function extractEmojis(tags: IObject | IObject[], host: string): Pr
|
||||||
if ((tag.updated != null && exists.updatedAt == null)
|
if ((tag.updated != null && exists.updatedAt == null)
|
||||||
|| (tag.id != null && exists.uri == null)
|
|| (tag.id != null && exists.uri == null)
|
||||||
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
|
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
|
||||||
|| (tag.icon!.url !== exists.url)
|
|| (tag.icon!.url !== exists.originalUrl)
|
||||||
) {
|
) {
|
||||||
await Emojis.update({
|
await Emojis.update({
|
||||||
host,
|
host,
|
||||||
name,
|
name,
|
||||||
}, {
|
}, {
|
||||||
uri: tag.id,
|
uri: tag.id,
|
||||||
url: tag.icon!.url,
|
originalUrl: tag.icon!.url,
|
||||||
|
publicUrl: tag.icon!.url,
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue