Skip to content

Commit

Permalink
カスタム絵文字のupdatedが更新されてなくてもたまにDB更新する
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed May 12, 2019
1 parent a64c966 commit cce3b35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/remote/activitypub/models/note.ts
Expand Up @@ -294,7 +294,9 @@ export async function extractEmojis(tags: ITag[], host_: string) {
if (exists) {
if ((tag.updated != null && exists.updatedAt == null)
|| (tag.id != null && exists.uri == null)
|| (exists.updatedAt != null && Date.now() - exists.updatedAt.getTime() > 1 * 86400 * 1000)
|| (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt)) {
logger.info(`update emoji host=${host}, name=${name}`);
return await Emoji.findOneAndUpdate({
host,
name,
Expand Down

0 comments on commit cce3b35

Please sign in to comment.