diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-07-28 05:32:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-28 05:32:40 +0900 |
| commit | 6138d46509f580cd97a721d2e2ec8c72cfc3f4f8 (patch) | |
| tree | f99a93d4514e3a4f83a98ec991391bd5d0e681b8 | |
| parent | Improve mobile notifications view (diff) | |
| download | sharkey-6138d46509f580cd97a721d2e2ec8c72cfc3f4f8.tar.gz sharkey-6138d46509f580cd97a721d2e2ec8c72cfc3f4f8.tar.bz2 sharkey-6138d46509f580cd97a721d2e2ec8c72cfc3f4f8.zip | |
AP Emojiのupdatedは採用しないように (#5220)
* AP Emojiのupdatedは採用しない
* updated判定は残す
| -rw-r--r-- | src/remote/activitypub/models/note.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 31e1ea10e7..9afbb39151 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -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>); })); |