This commit is contained in:
tamaina 2024-03-05 05:38:27 +00:00
parent 31bf1dbc95
commit 4b9ffb8dc0

View File

@ -14,6 +14,7 @@ import type { IActivity } from '@/core/activitypub/type.js';
import { ThinUser } from '@/queue/types.js';
import { AccountUpdateService } from '@/core/AccountUpdateService.js';
import { UserKeypairService } from '../UserKeypairService.js';
import Logger from '@/logger.js';
interface IRecipe {
type: string;
@ -23,6 +24,8 @@ interface IFollowersRecipe extends IRecipe {
type: 'Followers';
}
const logger = new Logger('deliver-manager', 'azure');
interface IDirectRecipe extends IRecipe {
type: 'Direct';
to: MiRemoteUser;
@ -114,6 +117,7 @@ class DeliverManager {
*/
const created = await this.userKeypairService.refreshAndprepareEd25519KeyPair(this.actor.id);
if (created) {
logger.info(`ed25519 key pair created for user ${this.actor.id} and publishing to followers`);
// リモートに配信
await this.accountUpdateService.publishToFollowers(this.actor.id, true);
}
@ -160,6 +164,7 @@ class DeliverManager {
// deliver
await this.queueService.deliverMany(this.actor, this.activity, inboxes);
logger.info(`Deliver queues dispatched to ${inboxes.size} inboxes`);
}
}