forked from mirror/misskey
configable
This commit is contained in:
parent
76def0032e
commit
60fd848182
@ -186,6 +186,10 @@ id: "aid"
|
|||||||
# Sign to ActivityPub GET request (default: true)
|
# Sign to ActivityPub GET request (default: true)
|
||||||
signToActivityPubGet: true
|
signToActivityPubGet: true
|
||||||
|
|
||||||
|
# Limit of notes to fetch from outbox with remote user first fetched (default: 5)
|
||||||
|
# https://github.com/misskey-dev/misskey/pull/11130
|
||||||
|
outboxNotesFetchLimit: 5
|
||||||
|
|
||||||
#allowedPrivateNetworks: [
|
#allowedPrivateNetworks: [
|
||||||
# '127.0.0.1/32'
|
# '127.0.0.1/32'
|
||||||
#]
|
#]
|
||||||
|
@ -96,6 +96,7 @@ export type Source = {
|
|||||||
videoThumbnailGenerator?: string;
|
videoThumbnailGenerator?: string;
|
||||||
|
|
||||||
signToActivityPubGet?: boolean;
|
signToActivityPubGet?: boolean;
|
||||||
|
outboxNotesFetchLimit?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -638,6 +638,8 @@ export class ApPersonService implements OnModuleInit {
|
|||||||
* This only retrieves the first page for now.
|
* This only retrieves the first page for now.
|
||||||
*/
|
*/
|
||||||
public async updateOutboxFirstPage(user: RemoteUser, outbox: IActor['outbox'], resolver: Resolver): Promise<void> {
|
public async updateOutboxFirstPage(user: RemoteUser, outbox: IActor['outbox'], resolver: Resolver): Promise<void> {
|
||||||
|
if (!this.config.outboxNotesFetchLimit) return;
|
||||||
|
|
||||||
// https://www.w3.org/TR/activitypub/#actor-objects
|
// https://www.w3.org/TR/activitypub/#actor-objects
|
||||||
// Outbox is a required property for all actors
|
// Outbox is a required property for all actors
|
||||||
if (!outbox) {
|
if (!outbox) {
|
||||||
@ -655,8 +657,8 @@ export class ApPersonService implements OnModuleInit {
|
|||||||
await resolver.resolveOrderedCollectionPage(collection.first) :
|
await resolver.resolveOrderedCollectionPage(collection.first) :
|
||||||
collection;
|
collection;
|
||||||
|
|
||||||
// Perform activity but only the first 20 ones with `type: Create`
|
// Perform activity but only the first outboxNotesFetchLimit ones with `type: Create`
|
||||||
await this.apInboxService.performActivity(user, firstPage, { limit: 20, allow: ['Create'] });
|
await this.apInboxService.performActivity(user, firstPage, { limit: this.config.outboxNotesFetchLimit, allow: ['Create'] });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user