mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 05:57:32 -07:00
AP Emojiのupdatedは採用しないように (#5220)
* AP Emojiのupdatedは採用しない * updated判定は残す
This commit is contained in:
parent
44e993e4f1
commit
f2fec97287
1 changed files with 3 additions and 2 deletions
|
@ -302,6 +302,7 @@ export async function extractEmojis(tags: ITag[], host: string): Promise<Emoji[]
|
|||
if ((tag.updated != null && exists.updatedAt == null)
|
||||
|| (tag.id != null && exists.uri == null)
|
||||
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)
|
||||
|| (tag.icon!.url !== exists.url)
|
||||
) {
|
||||
await Emojis.update({
|
||||
host,
|
||||
|
@ -309,7 +310,7 @@ export async function extractEmojis(tags: ITag[], host: string): Promise<Emoji[]
|
|||
}, {
|
||||
uri: tag.id,
|
||||
url: tag.icon!.url,
|
||||
updatedAt: new Date(tag.updated!),
|
||||
updatedAt: new Date(),
|
||||
});
|
||||
|
||||
return await Emojis.findOne({
|
||||
|
@ -329,7 +330,7 @@ export async function extractEmojis(tags: ITag[], host: string): Promise<Emoji[]
|
|||
name,
|
||||
uri: tag.id,
|
||||
url: tag.icon!.url,
|
||||
updatedAt: tag.updated ? new Date(tag.updated) : undefined,
|
||||
updatedAt: new Date(),
|
||||
aliases: []
|
||||
} as Partial<Emoji>);
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue