Skip to content

Commit

Permalink
fix: fixed readmode
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Feb 21, 2024
1 parent 50b6fd3 commit 7214d68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/restapi/src/lib/pushapi/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class Chat {
page: options?.page,
limit: options?.limit,
env: this.env,
toDecrypt: !!this.signer, // Set to false if signer is undefined or null,
toDecrypt: !!this.decryptedPgpPvtKey, // Set to false if signer is undefined or null,
};

switch (type) {
Expand All @@ -96,7 +96,7 @@ export class Chat {

const latestMessages = await PUSH_CHAT.latest({
threadhash: threadHash,
toDecrypt: !!this.signer, // Set to false if signer is undefined or null,
toDecrypt: !!this.decryptedPgpPvtKey, // Set to false if signer is undefined or null,
pgpPrivateKey: this.decryptedPgpPvtKey,
account: this.account,
env: this.env,
Expand Down Expand Up @@ -131,7 +131,7 @@ export class Chat {
env: this.env,
threadhash: reference,
pgpPrivateKey: this.decryptedPgpPvtKey,
toDecrypt: !!this.signer, // Set to false if signer is undefined or null,
toDecrypt: !!this.decryptedPgpPvtKey, // Set to false if signer is undefined or null,
limit: options?.limit,
});
const listType = intent ? 'CHATS' : 'REQUESTS';
Expand Down
2 changes: 1 addition & 1 deletion packages/restapi/src/lib/pushapi/space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export class Space {
page: options?.page,
limit: options?.limit,
env: this.env,
toDecrypt: !!this.signer, // Set to false if signer is undefined or null,
toDecrypt: !!this.decryptedPgpPvtKey, // Set to false if signer is undefined or null,
};

switch (type) {
Expand Down

0 comments on commit 7214d68

Please sign in to comment.