diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-23 08:01:14 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-23 08:01:14 +0900 |
| commit | 246cead2b1e179a02d81793a5515688539c788cd (patch) | |
| tree | a6114fdd6f96dbc6d0ba47843b9be29af7f1023c /src/remote/activitypub/models | |
| parent | Update systeminformation requirement from 3.47.0 to 3.49.3 (#3374) (diff) | |
| download | misskey-246cead2b1e179a02d81793a5515688539c788cd.tar.gz misskey-246cead2b1e179a02d81793a5515688539c788cd.tar.bz2 misskey-246cead2b1e179a02d81793a5515688539c788cd.zip | |
Improve user operations
Resolve #2197
Resolve #3367
Diffstat (limited to 'src/remote/activitypub/models')
| -rw-r--r-- | src/remote/activitypub/models/note.ts | 2 | ||||
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 48a02e79bd..82d6d267c2 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -104,7 +104,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false }); // ユーザーの情報が古かったらついでに更新しておく - if (actor.updatedAt == null || Date.now() - actor.updatedAt.getTime() > 1000 * 60 * 60 * 24) { + if (actor.lastFetchedAt == null || Date.now() - actor.lastFetchedAt.getTime() > 1000 * 60 * 60 * 24) { updatePerson(note.attributedTo); } diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index d78bc15c95..b2ca2eccae 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -143,7 +143,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU avatarId: null, bannerId: null, createdAt: Date.parse(person.published) || null, - updatedAt: new Date(), + lastFetchedAt: new Date(), description: htmlToMFM(person.summary), followersCount, followingCount, @@ -298,7 +298,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje // Update user await User.update({ _id: exist._id }, { $set: { - updatedAt: new Date(), + lastFetchedAt: new Date(), inbox: person.inbox, sharedInbox: person.sharedInbox, featured: person.featured, |