forked from FoundKeyGang/FoundKey
Johann150
1516ddfc9b
The CacheableUser, CacheableLocalUser and CacheableRemoteUser are identical types to User, ILocalUser and IRemoteUser so it seems nonsensical to have different types for them.
16 lines
558 B
TypeScript
16 lines
558 B
TypeScript
import { IRemoteUser } from '@/models/entities/user.js';
|
|
import { apLogger } from '@/remote/activitypub/logger.js';
|
|
import { Resolver } from '@/remote/activitypub/resolver.js';
|
|
import { IAnnounce, getApId } from '@/remote/activitypub/type.js';
|
|
import announceNote from './note.js';
|
|
|
|
export default async (actor: IRemoteUser, activity: IAnnounce, resolver: Resolver): Promise<void> => {
|
|
const uri = getApId(activity);
|
|
|
|
apLogger.info(`Announce: ${uri}`);
|
|
|
|
const targetUri = getApId(activity.object);
|
|
|
|
announceNote(resolver, actor, activity, targetUri);
|
|
};
|