orgnote-api 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,13 +88,15 @@ export async function decryptNote<T extends AbstractEncryptedNote>(
88
88
  note: T,
89
89
  encryptionParams: OrgNoteEncryption
90
90
  ): Promise<T> {
91
+ const isContentEncrypted = isGpgEncrypted(note.content);
91
92
  if (
92
93
  note.meta.published ||
93
94
  !note.encryptionType ||
94
95
  !encryptionParams.type ||
95
- encryptionParams.type === ModelsPublicNoteEncryptionTypeEnum.Disabled
96
+ encryptionParams.type === ModelsPublicNoteEncryptionTypeEnum.Disabled ||
97
+ !isContentEncrypted
96
98
  ) {
97
- note.encrypted = isGpgEncrypted(note.content);
99
+ note.encrypted = isContentEncrypted;
98
100
  return note;
99
101
  }
100
102
  note.encrypted = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.ts",