pub-relay (#6341)
* pub-relay * relay actorをApplicationにする * Disable koa-compress * Homeはリレーに送らない * Disable debug * UI * cleanupなど
This commit is contained in:
@@ -31,6 +31,7 @@ import { ensure } from '../../prelude/ensure';
|
||||
import { checkHitAntenna } from '../../misc/check-hit-antenna';
|
||||
import { addNoteToAntenna } from '../add-note-to-antenna';
|
||||
import { countSameRenotes } from '../../misc/count-same-renotes';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
type NotificationType = 'reply' | 'renote' | 'quote' | 'mention';
|
||||
|
||||
@@ -349,6 +350,10 @@ export default async (user: User, data: Option, silent = false) => new Promise<N
|
||||
dm.addFollowersRecipe();
|
||||
}
|
||||
|
||||
if (['public'].includes(note.visibility)) {
|
||||
deliverToRelays(user, noteActivity);
|
||||
}
|
||||
|
||||
dm.execute();
|
||||
})();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Notes, Users, Instances } from '../../models';
|
||||
import { notesChart, perUserNotesChart, instanceChart } from '../chart';
|
||||
import { deliverToFollowers } from '../../remote/activitypub/deliver-manager';
|
||||
import { countSameRenotes } from '../../misc/count-same-renotes';
|
||||
import { deliverToRelays } from '../relay';
|
||||
|
||||
/**
|
||||
* 投稿を削除します。
|
||||
@@ -48,6 +49,7 @@ export default async function(user: User, note: Note, quiet = false) {
|
||||
: renderDelete(renderTombstone(`${config.url}/notes/${note.id}`), user));
|
||||
|
||||
deliverToFollowers(user, content);
|
||||
deliverToRelays(user, content);
|
||||
}
|
||||
|
||||
// also deliever delete activity to cascaded notes
|
||||
|
||||
@@ -4,6 +4,7 @@ import renderNote from '../../../remote/activitypub/renderer/note';
|
||||
import { Users, Notes } from '../../../models';
|
||||
import { Note } from '../../../models/entities/note';
|
||||
import { deliverToFollowers } from '../../../remote/activitypub/deliver-manager';
|
||||
import { deliverToRelays } from '../../relay';
|
||||
|
||||
export async function deliverQuestionUpdate(noteId: Note['id']) {
|
||||
const note = await Notes.findOne(noteId);
|
||||
@@ -16,5 +17,6 @@ export async function deliverQuestionUpdate(noteId: Note['id']) {
|
||||
|
||||
const content = renderActivity(renderUpdate(await renderNote(note, false), user));
|
||||
deliverToFollowers(user, content);
|
||||
deliverToRelays(user, content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user