summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-09-25 07:44:42 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-09-25 07:44:42 +0900
commitdf0a90f69f151b3a0a5d88f1dba2e502231d604c (patch)
tree53e243dd549c225aa39bbc3710c455c9fa8645f9 /packages
parenttype (diff)
downloadsharkey-df0a90f69f151b3a0a5d88f1dba2e502231d604c.tar.gz
sharkey-df0a90f69f151b3a0a5d88f1dba2e502231d604c.tar.bz2
sharkey-df0a90f69f151b3a0a5d88f1dba2e502231d604c.zip
fix type
Diffstat (limited to 'packages')
-rw-r--r--packages/backend/src/core/remote/activitypub/ApRendererService.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/remote/activitypub/ApRendererService.ts b/packages/backend/src/core/remote/activitypub/ApRendererService.ts
index a401b7424f..38850fd127 100644
--- a/packages/backend/src/core/remote/activitypub/ApRendererService.ts
+++ b/packages/backend/src/core/remote/activitypub/ApRendererService.ts
@@ -23,7 +23,7 @@ import type { UserKeypair } from '@/models/entities/UserKeypair.js';
import type { UsersRepository, UserProfilesRepository, NotesRepository, DriveFilesRepository, EmojisRepository, PollsRepository } from '@/models/index.js';
import { LdSignatureService } from './LdSignatureService.js';
import { ApMfmService } from './ApMfmService.js';
-import type { IActivity } from './type.js';
+import type { IActivity, IObject } from './type.js';
import type { IIdentifier } from './models/identifier.js';
@Injectable()
@@ -276,7 +276,7 @@ export class ApRendererService {
};
}
- public async renderNote(note: Note, dive = true, isTalk = false): Promise<Record<string, unknown>> {
+ public async renderNote(note: Note, dive = true, isTalk = false): Promise<IObject> {
const getPromisedFiles = async (ids: string[]) => {
if (!ids || ids.length === 0) return [];
const items = await this.driveFilesRepository.findBy({ id: In(ids) });
@@ -399,8 +399,8 @@ export class ApRendererService {
id: `${this.config.url}/notes/${note.id}`,
type: 'Note',
attributedTo,
- summary,
- content,
+ summary: summary ?? undefined,
+ content: content ?? undefined,
_misskey_content: text,
source: {
content: text,