This commit is contained in:
Bryan Ashby 2023-02-10 22:29:33 -07:00
parent 6466220b6d
commit a09fe4894f
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 6 additions and 1 deletions

View File

@ -63,6 +63,11 @@ module.exports = class Actor extends ActivityPubObject {
return true; return true;
} }
static fromJsonString(s) {
const obj = ActivityPubObject.fromJsonString(s);
return new Actor(obj);
}
static get WellKnownActorTypes() { static get WellKnownActorTypes() {
return ['Person', 'Group', 'Organization', 'Service', 'Application']; return ['Person', 'Group', 'Organization', 'Service', 'Application'];
} }
@ -220,7 +225,7 @@ module.exports = class Actor extends ActivityPubObject {
apDb.run( apDb.run(
`DELETE FROM actor_cache `DELETE FROM actor_cache
WHERE DATETIME(timestamp) > DATETIME("now", "+${ActorCacheMaxAgeDays}");`, WHERE DATETIME(timestamp, "+${ActorCacheMaxAgeDays} days") > DATETIME("now");`,
err => { err => {
if (err) { if (err) {
// :TODO: log me // :TODO: log me