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 <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2022-04-18 01:35:47 +02:00 committed by David Mehren
parent 3cff7f861a
commit ef0fdac18c

View file

@ -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 ?? '',