This commit is contained in:
syuilo 2022-02-25 20:03:17 +09:00
parent d51c18d96d
commit f003289816
2 changed files with 4 additions and 4 deletions

View file

@ -202,8 +202,8 @@ export class NoteRepository extends Repository<Note> {
let text = note.text;
if (note.name && (note.url || note.uri)) {
text = `${note.name}\n${(note.text || '').trim()}\n\n${note.url || note.uri}`;
if (note.name && (note.url ?? note.uri)) {
text = `${note.name}\n${(note.text || '').trim()}\n\n${note.url ?? note.uri}`;
}
const channel = note.channelId
@ -218,7 +218,7 @@ export class NoteRepository extends Repository<Note> {
id: note.id,
createdAt: note.createdAt.toISOString(),
userId: note.userId,
user: Users.pack(note.user || note.userId, me, {
user: Users.pack(note.user ?? note.userId, me, {
detail: false,
}),
text: text,