@thezelijah/majik-message 1.0.6 → 1.0.8
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.
|
@@ -33,7 +33,7 @@ export declare class MajikMessageChat {
|
|
|
33
33
|
*/
|
|
34
34
|
getCompressedMessage(): string;
|
|
35
35
|
/**
|
|
36
|
-
* Set the message content (already
|
|
36
|
+
* Set the message content (already encrypted).
|
|
37
37
|
* Used after encryption to update the message with encrypted payload.
|
|
38
38
|
*/
|
|
39
39
|
setMessage(compressedMessage: string): void;
|
|
@@ -79,11 +79,10 @@ export class MajikMessageChat {
|
|
|
79
79
|
return this.message;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Set the message content (already
|
|
82
|
+
* Set the message content (already encrypted).
|
|
83
83
|
* Used after encryption to update the message with encrypted payload.
|
|
84
84
|
*/
|
|
85
85
|
setMessage(compressedMessage) {
|
|
86
|
-
this.validateMessage(compressedMessage);
|
|
87
86
|
this.message = compressedMessage;
|
|
88
87
|
}
|
|
89
88
|
getSender() {
|
|
@@ -69,8 +69,8 @@ export class MajikMessageIdentity {
|
|
|
69
69
|
assertString(label, "label");
|
|
70
70
|
const generatedID = autogenerateID();
|
|
71
71
|
const timestamp = new Date().toISOString();
|
|
72
|
-
const phash = sha256(`${user.id}:${account.id}:${generatedID}`);
|
|
73
72
|
const publicKey = account.publicKeyBase64;
|
|
73
|
+
const phash = sha256(`${user.id}:${publicKey}:${generatedID}`);
|
|
74
74
|
return new MajikMessageIdentity({
|
|
75
75
|
id: generatedID,
|
|
76
76
|
userId: user.id,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@thezelijah/majik-message",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Encrypt and decrypt messages on any website. Secure chats with keypairs and seed-based accounts. Open source.",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.8",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|