From ef0fdac18c5c789108504d71d257dfb6a4153542 Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Mon, 18 Apr 2022 01:35:47 +0200 Subject: [PATCH] fix(notes): primaryAddress reveals internal UUID The primaryAddress field of a note contained the internal UUID of the note when no primary alias was defined instead of the public note id. Signed-off-by: Erik Michelson --- src/notes/notes.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notes/notes.service.ts b/src/notes/notes.service.ts index e4f35c8b4..ac30f672a 100644 --- a/src/notes/notes.service.ts +++ b/src/notes/notes.service.ts @@ -331,7 +331,7 @@ export class NotesService { await note.aliases ).map((alias) => this.aliasService.toAliasDto(alias, note)), ), - primaryAddress: (await getPrimaryAlias(note)) ?? note.id, + primaryAddress: (await getPrimaryAlias(note)) ?? note.publicId, title: note.title ?? '', createdAt: note.createdAt, description: note.description ?? '',