cleanup: trim trailing whitespace (#11136)
* cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -38,9 +38,9 @@ export class FeedService {
|
||||
link: `${this.config.url}/@${user.username}`,
|
||||
name: user.name ?? user.username,
|
||||
};
|
||||
|
||||
|
||||
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
||||
|
||||
|
||||
const notes = await this.notesRepository.find({
|
||||
where: {
|
||||
userId: user.id,
|
||||
@@ -50,7 +50,7 @@ export class FeedService {
|
||||
order: { createdAt: -1 },
|
||||
take: 20,
|
||||
});
|
||||
|
||||
|
||||
const feed = new Feed({
|
||||
id: author.link,
|
||||
title: `${author.name} (@${user.username}@${this.config.host})`,
|
||||
@@ -66,13 +66,13 @@ export class FeedService {
|
||||
author,
|
||||
copyright: user.name ?? user.username,
|
||||
});
|
||||
|
||||
|
||||
for (const note of notes) {
|
||||
const files = note.fileIds.length > 0 ? await this.driveFilesRepository.findBy({
|
||||
id: In(note.fileIds),
|
||||
}) : [];
|
||||
const file = files.find(file => file.type.startsWith('image/'));
|
||||
|
||||
|
||||
feed.addItem({
|
||||
title: `New note by ${author.name}`,
|
||||
link: `${this.config.url}/notes/${note.id}`,
|
||||
@@ -82,7 +82,7 @@ export class FeedService {
|
||||
image: file ? this.driveFileEntityService.getPublicUrl(file) ?? undefined : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return feed;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user