From c9c5c733df9e9aaa5fcb999ce836aa859246018d Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:44:14 +0100 Subject: [PATCH] feat: Implement hide author advanced publication settings option - EXO-72746 - Meeds-io/MIPs#161 (#1196) Implement hide author advanced publication settings option fix: Unable to update hideReaction property in case of existing translation versions - EXO-72747 - Meeds-io/MIPs#161 (#1199) Unable to update hideReaction/hideAuthor property in case of existing translation versions --- .../meeds/notes/model/NotePageProperties.java | 3 + .../rest/model/PagePropertiesEntity.java | 2 + .../meeds/notes/rest/utils/EntityBuilder.java | 1 + .../exoplatform/wiki/jpa/EntityConverter.java | 104 ++++++++++++------ .../wiki/service/impl/NoteServiceImpl.java | 3 + .../wiki/service/TestNoteService.java | 34 +++++- .../portlet/notes/notesPortlet_en.properties | 2 + .../portlet/notes/notesPortlet_fr.properties | 2 + .../components/NotePublicationDrawer.vue | 54 ++++++--- .../NotePublicationAdvancedOption.vue | 86 +++++++++++++++ .../schedule-option/NoteScheduleOption.vue | 4 +- .../notes-publication/initComponents.js | 4 +- .../NoteMetadataPropertiesForm.vue | 1 + 13 files changed, 247 insertions(+), 53 deletions(-) create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue diff --git a/notes-service/src/main/java/io/meeds/notes/model/NotePageProperties.java b/notes-service/src/main/java/io/meeds/notes/model/NotePageProperties.java index 4e42b68c46..9967769249 100644 --- a/notes-service/src/main/java/io/meeds/notes/model/NotePageProperties.java +++ b/notes-service/src/main/java/io/meeds/notes/model/NotePageProperties.java @@ -37,5 +37,8 @@ public class NotePageProperties implements Serializable { private NoteFeaturedImage featuredImage; + private boolean hideAuthor; + private boolean isDraft; + } diff --git a/notes-service/src/main/java/io/meeds/notes/rest/model/PagePropertiesEntity.java b/notes-service/src/main/java/io/meeds/notes/rest/model/PagePropertiesEntity.java index 36a491307b..36abe70c6d 100644 --- a/notes-service/src/main/java/io/meeds/notes/rest/model/PagePropertiesEntity.java +++ b/notes-service/src/main/java/io/meeds/notes/rest/model/PagePropertiesEntity.java @@ -34,6 +34,8 @@ public class PagePropertiesEntity implements Serializable { private String summary; private FeaturedImageEntity featuredImage; + + private boolean hideAuthor; private boolean isDraft; } diff --git a/notes-service/src/main/java/io/meeds/notes/rest/utils/EntityBuilder.java b/notes-service/src/main/java/io/meeds/notes/rest/utils/EntityBuilder.java index c382f8e012..07d7d6534a 100644 --- a/notes-service/src/main/java/io/meeds/notes/rest/utils/EntityBuilder.java +++ b/notes-service/src/main/java/io/meeds/notes/rest/utils/EntityBuilder.java @@ -40,6 +40,7 @@ public static NotePageProperties toNotePageProperties(PagePropertiesEntity pageP return new NotePageProperties(pagePropertiesEntity.getNoteId(), pagePropertiesEntity.getSummary(), toNoteFeaturedImage(pagePropertiesEntity.getFeaturedImage()), + pagePropertiesEntity.isHideAuthor(), pagePropertiesEntity.isDraft()); } diff --git a/notes-service/src/main/java/org/exoplatform/wiki/jpa/EntityConverter.java b/notes-service/src/main/java/org/exoplatform/wiki/jpa/EntityConverter.java index 2cecfe3850..05e68e13fa 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/jpa/EntityConverter.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/jpa/EntityConverter.java @@ -38,6 +38,7 @@ import org.exoplatform.social.core.space.model.Space; import org.exoplatform.social.core.space.spi.SpaceService; import org.exoplatform.social.metadata.MetadataService; +import org.exoplatform.social.metadata.model.MetadataItem; import org.exoplatform.social.metadata.model.MetadataKey; import org.exoplatform.social.metadata.model.MetadataType; import org.exoplatform.wiki.WikiException; @@ -51,23 +52,26 @@ import java.io.ByteArrayInputStream; import java.util.*; +import java.util.stream.Collectors; /** * Utility class to convert JPA entity objects */ public class EntityConverter { - private static final Log LOG = ExoLogger.getLogger(EntityConverter.class); + private static final Log LOG = ExoLogger.getLogger(EntityConverter.class); - private static SpaceService spaceService; + private static SpaceService spaceService; - private static MetadataService metadataService; + private static MetadataService metadataService; - public static final MetadataType NOTES_METADATA_TYPE = new MetadataType(1001, "notes"); + public static final MetadataType NOTES_METADATA_TYPE = new MetadataType(1001, "notes"); - public static final MetadataKey NOTES_METADATA_KEY = new MetadataKey(NOTES_METADATA_TYPE.getName(), - Utils.NOTES_METADATA_OBJECT_TYPE, - 0); + public static final MetadataKey NOTES_METADATA_KEY = new MetadataKey(NOTES_METADATA_TYPE.getName(), + Utils.NOTES_METADATA_OBJECT_TYPE, + 0); + + private static final List ORIGINAL_SHARED_PROPERTIES = List.of("hideReaction", "hideAuthor"); public static Wiki convertWikiEntityToWiki(WikiEntity wikiEntity) { Wiki wiki = null; @@ -147,7 +151,7 @@ public static Page convertPageEntityToPage(PageEntity pageEntity) { } return page; } - + public static void buildNotePageMetadata(Page note, boolean isDraft) { if (note == null) { return; @@ -158,6 +162,7 @@ public static void buildNotePageMetadata(Page note, boolean isDraft) { if (note.getLang() != null) { noteId = noteId + "-" + note.getLang(); } + Map originalNoteSharedProperties = getOriginalNoteSharedProperties(note, space.getId()); NoteMetadataObject noteMetadataObject = new NoteMetadataObject(isDraft ? "noteDraftPage" : "notePage", noteId, note.getParentPageId(), @@ -167,40 +172,13 @@ public static void buildNotePageMetadata(Page note, boolean isDraft) { .findFirst() .ifPresent(metadataItem -> { if (!MapUtils.isEmpty(metadataItem.getProperties())) { - buildPageProperties(metadataItem.getProperties(), note); + buildPageProperties(metadataItem.getProperties(), originalNoteSharedProperties, note); } }); } } - - private static void buildPageProperties(Map properties, Page note) { - NotePageProperties notePageProperties = new NotePageProperties(); - NoteFeaturedImage noteFeaturedImage = new NoteFeaturedImage(); - notePageProperties.setNoteId(Long.parseLong(note.getId())); - notePageProperties.setSummary(properties.get(NoteServiceImpl.SUMMARY_PROP)); - noteFeaturedImage.setId(Long.valueOf(properties.getOrDefault(NoteServiceImpl.FEATURED_IMAGE_ID, "0"))); - noteFeaturedImage.setLastUpdated(Long.valueOf(properties.getOrDefault(NoteServiceImpl.FEATURED_IMAGE_UPDATED_DATE, "0"))); - noteFeaturedImage.setAltText(properties.get(NoteServiceImpl.FEATURED_IMAGE_ALT_TEXT)); - notePageProperties.setDraft(note.isDraftPage()); - notePageProperties.setFeaturedImage(noteFeaturedImage); - note.setProperties(notePageProperties); - } - - private static SpaceService getSpaceService() { - if (spaceService == null) { - spaceService = CommonsUtils.getService(SpaceService.class); - } - return spaceService; - } - private static MetadataService getMetadataService() { - if (metadataService == null) { - metadataService = CommonsUtils.getService(MetadataService.class); - } - return metadataService; - } - public static List convertPermissionEntitiesToPermissionEntries(List permissionEntities, List filteredPermissionTypes) { List permissionEntries = new ArrayList<>(); @@ -586,4 +564,58 @@ public static List toPageHistoryVersions(List pa public static List toDraftPages(List draftPageEntities) { return draftPageEntities.stream().map(EntityConverter::convertDraftPageEntityToDraftPage).toList(); } + + private static Map getOriginalNoteSharedProperties(Page note, String spaceId) { + if (note.getLang() == null || note.isDraftPage()) { + return new HashMap<>(); + } + NoteMetadataObject originalNoteMetadataObject = new NoteMetadataObject("notePage", + note.getId(), + note.getParentPageId(), + Long.parseLong(spaceId)); + List metadataItems = getMetadataService().getMetadataItemsByMetadataAndObject(NOTES_METADATA_KEY, + originalNoteMetadataObject); + Map originalNoteSharedProperties = new HashMap<>(); + if (!CollectionUtils.isEmpty(metadataItems)) { + originalNoteSharedProperties = metadataItems.getFirst().getProperties(); + } + return originalNoteSharedProperties.entrySet() + .stream() + .filter(entry -> ORIGINAL_SHARED_PROPERTIES.contains(entry.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } + + private static void buildPageProperties(Map properties, + Map originalNoteSharedProperties, + Page note) { + Map finalProperties = new HashMap<>(properties); + finalProperties.putAll(originalNoteSharedProperties); + NotePageProperties notePageProperties = new NotePageProperties(); + NoteFeaturedImage noteFeaturedImage = new NoteFeaturedImage(); + notePageProperties.setNoteId(Long.parseLong(note.getId())); + notePageProperties.setSummary(finalProperties.get(NoteServiceImpl.SUMMARY_PROP)); + notePageProperties.setHideAuthor(Boolean.parseBoolean(finalProperties.getOrDefault(NoteServiceImpl.HIDE_AUTHOR_PROP, + "false"))); + noteFeaturedImage.setId(Long.valueOf(finalProperties.getOrDefault(NoteServiceImpl.FEATURED_IMAGE_ID, "0"))); + noteFeaturedImage.setLastUpdated(Long.valueOf(finalProperties.getOrDefault(NoteServiceImpl.FEATURED_IMAGE_UPDATED_DATE, + "0"))); + noteFeaturedImage.setAltText(finalProperties.get(NoteServiceImpl.FEATURED_IMAGE_ALT_TEXT)); + notePageProperties.setDraft(note.isDraftPage()); + notePageProperties.setFeaturedImage(noteFeaturedImage); + note.setProperties(notePageProperties); + } + + private static SpaceService getSpaceService() { + if (spaceService == null) { + spaceService = CommonsUtils.getService(SpaceService.class); + } + return spaceService; + } + + private static MetadataService getMetadataService() { + if (metadataService == null) { + metadataService = CommonsUtils.getService(MetadataService.class); + } + return metadataService; + } } diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java index e7cb06618d..968af12f95 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java @@ -142,6 +142,8 @@ public class NoteServiceImpl implements NoteService { public static final String SUMMARY_PROP = "summary"; + public static final String HIDE_AUTHOR_PROP = "hideAuthor"; + public static final String FEATURED_IMAGE_ID = "featuredImageId"; public static final String FEATURED_IMAGE_UPDATED_DATE = "featuredImageUpdatedDate"; @@ -1749,6 +1751,7 @@ public NotePageProperties saveNoteMetadata(NotePageProperties notePageProperties properties = metadataItem.getProperties(); } properties.put(SUMMARY_PROP, notePageProperties.getSummary()); + properties.put(HIDE_AUTHOR_PROP, String.valueOf(notePageProperties.isHideAuthor())); if (featuredImageId != null) { properties.put(FEATURED_IMAGE_ID, String.valueOf(featuredImageId)); properties.put(FEATURED_IMAGE_UPDATED_DATE, String.valueOf(new Date().getTime())); diff --git a/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java b/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java index 0bc0adbabc..a4d304ffdf 100644 --- a/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java +++ b/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java @@ -736,7 +736,14 @@ public void testRemoveOrphanDraftPagesByParentPage() throws Exception { } private Page createTestNoteWithVersionLang(String name, String lang, Identity user) throws Exception { - Wiki portalWiki = getOrCreateWiki(wService, PortalConfig.PORTAL_TYPE, "testPortal"); + identityManager.getOrCreateUserIdentity("root"); + Space space = new Space(); + space.setDisplayName("test"); + space.setPrettyName("test"); + space.setRegistration(Space.OPEN); + space.setVisibility(Space.PUBLIC); + space = spaceService.createSpace(space, "root"); + Wiki portalWiki = getOrCreateWiki(wService, PortalConfig.PORTAL_TYPE, space.getGroupId()); Page note = noteService.createNote(portalWiki, "Home", new Page(name, name), user); note.setLang(lang); note.setTitle("language title"); @@ -997,6 +1004,31 @@ public void testGetDraftsOfWiki() throws Exception { draftPage.setParentPageId(note2.getId()); noteService.createDraftForExistPage(draftPage, note, null, new Date().getTime(), "root"); assertEquals(2, noteService.getDraftsOfWiki(portalWiki.getOwner(), portalWiki.getType(), portalWiki.getWikiHome().getName()).size()); + } + + public void testSaveHideAuthorProperty() throws Exception { + Identity user = new Identity("user"); + Page note = createTestNoteWithVersionLang("testMetadataHideAuthor", null, user); + + this.bindMockedUploadService(); + NotePageProperties notePageProperties = createNotePageProperties(Long.parseLong(note.getId()), "alt text", "summary test"); + notePageProperties.setHideAuthor(true); + NotePageProperties properties = noteService.saveNoteMetadata(notePageProperties, null, 1L); + assertEquals("summary test", properties.getSummary()); + assertTrue(properties.isHideAuthor()); + + note.setLang("en"); + note.setTitle("en title"); + note.setContent("en content"); + noteService.createVersionOfNote(note, user.getUserId()); + notePageProperties = createNotePageProperties(Long.parseLong(note.getId()), "alt text en", "summary test en"); + notePageProperties.setHideAuthor(false); + noteService.saveNoteMetadata(notePageProperties, "en", 1L); + + // when fetch version language metadata properties we should return the original + // note properties values in case of shared original properties values + note = noteService.getNoteByIdAndLang(Long.valueOf(note.getId()), "en"); + assertTrue(note.getProperties().isHideAuthor()); } } diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties index bff9797ba6..71d79c2488 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties @@ -101,6 +101,8 @@ notes.publication.endTime.label=End time notes.publication.settings.update.success=Publication settings updated successfully notes.publication.settings.update.error=Error while updating publication settings notes.publication.schedule.publish.now.tooltip=By scheduling only a end date you will publish now +notes.publication.advanced.option.label=Advanced options +notes.publication.hide.author.label=Hide author popup.confirm=Confirm popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties index ce8bae9ec9..62fe98fed6 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties @@ -101,6 +101,8 @@ notes.publication.endTime.label=Heure de fin notes.publication.settings.update.success=Les paramétres de publication ont été mis \u00E0 jour avec succés notes.publication.settings.update.error=Erreur lors de la mise \u00E0 jour des paramétres de publication notes.publication.schedule.publish.now.tooltip=En programmant uniquement une date de fin vous allez publier de suite +notes.publication.advanced.option.label=Options avancées +notes.publication.hide.author.label=Masquer l'auteur popup.confirm=Confirmer popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index 6cfa6a350d..abe6776daf 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -164,6 +164,14 @@ }" ref="scheduleOption" @updated="updatedScheduleSettings" /> + @@ -208,8 +216,10 @@ export default { post: true }, scheduleSettings: {}, + advancedSettings: {}, currentPublicationSettings: {}, - currentScheduleSettings: {} + currentScheduleSettings: {}, + currentAdvancedSettings: {} }; }, props: { @@ -287,10 +297,16 @@ export default { } }, methods: { + updateAdvancedSettings(settings) { + this.advancedSettings = structuredClone(settings); + this.publicationSettings.advancedSettings = this.advancedSettings; + this.noteObject.properties.hideAuthor = this.advancedSettings?.hideAuthor; + }, updatedPublicationSettings(settings) { this.publicationSettings = structuredClone({ post: this.publicationSettings.post, - scheduleSettings: this.publicationSettings.scheduleSettings + scheduleSettings: this.publicationSettings.scheduleSettings, + advancedSettings: this.publicationSettings.advancedSettings }); this.publicationSettings.publish = settings?.publish; this.publicationSettings.selectedTargets = settings?.selectedTargets; @@ -321,19 +337,12 @@ export default { open(noteObject) { this.noteObject = noteObject; if (this.editMode) { - this.publicationSettings.post = this.noteObject?.activityPosted; - - this.scheduleSettings.schedule = !!this.noteObject?.schedulePostDate || !!this.noteObject?.scheduleUnpublishDate; - this.scheduleSettings.editScheduleAction = this.scheduleSettings.schedule && 'schedule' || null; - this.scheduleSettings.postDate = this.noteObject?.schedulePostDate; - this.scheduleSettings.unpublishDate = this.noteObject?.scheduleUnpublishDate; - this.publicationSettings.scheduleSettings = this.scheduleSettings; - - this.publicationSettings.publish = this.noteObject?.published; - this.publicationSettings.selectedTargets = this.noteObject?.targets; - this.publicationSettings.selectedAudience = this.noteObject?.audience; + this.cloneScheduleSettings(); + this.cloneAdvancedSettings(); + this.clonePublicationSettings(); } this.currentScheduleSettings = structuredClone(this.scheduleSettings); + this.currentAdvancedSettings = structuredClone(this.advancedSettings); this.currentPublicationSettings = structuredClone(this.publicationSettings); this.cloneProperties(); this.$refs.publicationDrawer.open(); @@ -341,6 +350,7 @@ export default { setTimeout(() => { this.$refs?.publishOption?.initSettings(); this.$refs?.scheduleOption?.initSettings(); + this.$refs?.advancedOption?.initSettings(); }, 200); this.$refs.propertiesForm?.initProperties(); }, @@ -351,6 +361,23 @@ export default { }, 50); } }, + cloneAdvancedSettings() { + this.advancedSettings.hideAuthor = this.noteObject?.properties?.hideAuthor; + }, + clonePublicationSettings() { + this.publicationSettings.post = this.noteObject?.activityPosted; + this.publicationSettings.scheduleSettings = this.scheduleSettings; + this.publicationSettings.advancedSettings = this.advancedSettings; + this.publicationSettings.publish = this.noteObject?.published; + this.publicationSettings.selectedTargets = this.noteObject?.targets; + this.publicationSettings.selectedAudience = this.noteObject?.audience; + }, + cloneScheduleSettings() { + this.scheduleSettings.schedule = !!this.noteObject?.schedulePostDate || !!this.noteObject?.scheduleUnpublishDate; + this.scheduleSettings.editScheduleAction = this.scheduleSettings.schedule && 'schedule' || null; + this.scheduleSettings.postDate = this.noteObject?.schedulePostDate; + this.scheduleSettings.unpublishDate = this.noteObject?.scheduleUnpublishDate; + }, cloneProperties() { this.currentNoteProperties = structuredClone( this.noteObject?.id && @@ -368,6 +395,7 @@ export default { cancelChanges() { this.$refs?.publishOption?.cancelChanges(); this.$refs?.scheduleOption?.cancelChanges(); + this.$refs?.advancedOption?.cancelChanges(); }, reset() { setTimeout(() => { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue new file mode 100644 index 0000000000..2508d45ba4 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue index 9fa4de16d9..1df7e12d1d 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue @@ -64,14 +64,14 @@ :ripple="false" color="primary" class="mt-n1 me-1" /> -

+

{{ $t('notes.publication.schedule.label') }}

+ class="width-fit-content mt-5">
diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js index 932805a8f7..0a52aa0c10 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js @@ -4,6 +4,7 @@ import NotePublishOption from './components/publish-option/NotePublishOption.vue import NotePublicationTargetDrawer from './components/publish-option/NotePublicationTargetDrawer.vue'; import NotePublicationTargetList from './components/publish-option/NotePublicationTargetList.vue'; import NoteScheduleOption from './components/schedule-option/NoteScheduleOption.vue'; +import NotePublicationAdvancedOption from './components/advanced-option/NotePublicationAdvancedOption.vue'; const components = { 'note-publication-drawer': NotePublicationDrawer, @@ -11,7 +12,8 @@ const components = { 'note-publish-option': NotePublishOption, 'note-publication-target-drawer': NotePublicationTargetDrawer, 'note-publication-target-list': NotePublicationTargetList, - 'note-schedule-option': NoteScheduleOption + 'note-schedule-option': NoteScheduleOption, + 'note-publication-advanced-option': NotePublicationAdvancedOption }; for (const key in components) { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue index 498ab83a11..4c5b25c882 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue @@ -225,6 +225,7 @@ export default { const properties = { noteId: this.noteObject?.id, summary: this.summaryContent, + hideAuthor: this.noteObject?.properties?.hideAuthor, featuredImage: { id: savedFeaturedImageId, uploadId: this.uploadId,