pub-relay (#6341)
* pub-relay * relay actorをApplicationにする * Disable koa-compress * Homeはリレーに送らない * Disable debug * UI * cleanupなど
This commit is contained in:
parent
be183206e6
commit
145389768d
27 changed files with 510 additions and 12 deletions
|
@ -9,6 +9,7 @@ import { Notes, UserNotePinings, Users } from '../../models';
|
|||
import { UserNotePining } from '../../models/entities/user-note-pinings';
|
||||
import { genId } from '../../misc/gen-id';
|
||||
import { deliverToFollowers } from '../../remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
/**
|
||||
* 指定した投稿をピン留めします
|
||||
|
@ -87,4 +88,5 @@ export async function deliverPinnedChange(userId: User['id'], noteId: Note['id']
|
|||
const content = renderActivity(isAddition ? renderAdd(user, target, item) : renderRemove(user, target, item));
|
||||
|
||||
deliverToFollowers(user, content);
|
||||
deliverToRelays(user, content);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import { Users } from '../../models';
|
|||
import { User } from '../../models/entities/user';
|
||||
import { renderPerson } from '../../remote/activitypub/renderer/person';
|
||||
import { deliverToFollowers } from '../../remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
export async function publishToFollowers(userId: User['id']) {
|
||||
const user = await Users.findOne(userId);
|
||||
|
@ -13,5 +14,6 @@ export async function publishToFollowers(userId: User['id']) {
|
|||
if (Users.isLocalUser(user)) {
|
||||
const content = renderActivity(renderUpdate(await renderPerson(user), user));
|
||||
deliverToFollowers(user, content);
|
||||
deliverToRelays(user, content);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue