zalo-toolkit 1.1.5 → 1.1.6
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
3
5
|
exports.Reactions = void 0;
|
|
4
6
|
(function (Reactions) {
|
|
5
7
|
Reactions["HEART"] = "/-heart";
|
|
@@ -63,7 +65,7 @@ class Reaction {
|
|
|
63
65
|
this.data = data;
|
|
64
66
|
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
65
67
|
this.isSelf = data.uidFrom == "0";
|
|
66
|
-
this.
|
|
68
|
+
this.type = isGroup ? Enum.ThreadType.Group : Enum.ThreadType.User;
|
|
67
69
|
if (data.idTo == "0")
|
|
68
70
|
data.idTo = uid;
|
|
69
71
|
if (data.uidFrom == "0")
|
package/dist/cjs/models/Undo.cjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
3
5
|
class Undo {
|
|
4
6
|
constructor(uid, data, isGroup) {
|
|
5
7
|
this.data = data;
|
|
6
8
|
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
7
9
|
this.isSelf = data.uidFrom == "0";
|
|
8
|
-
this.
|
|
10
|
+
this.type = isGroup ? Enum.ThreadType.Group : Enum.ThreadType.User;
|
|
9
11
|
if (data.idTo == "0")
|
|
10
12
|
data.idTo = uid;
|
|
11
13
|
if (data.uidFrom == "0")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
1
2
|
export declare enum Reactions {
|
|
2
3
|
HEART = "/-heart",
|
|
3
4
|
LIKE = "/-strong",
|
|
@@ -80,6 +81,6 @@ export declare class Reaction {
|
|
|
80
81
|
data: TReaction;
|
|
81
82
|
threadId: string;
|
|
82
83
|
isSelf: boolean;
|
|
83
|
-
|
|
84
|
+
type: ThreadType;
|
|
84
85
|
constructor(uid: string, data: TReaction, isGroup: boolean);
|
|
85
86
|
}
|
package/dist/models/Reaction.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
1
2
|
export var Reactions;
|
|
2
3
|
(function (Reactions) {
|
|
3
4
|
Reactions["HEART"] = "/-heart";
|
|
@@ -61,7 +62,7 @@ export class Reaction {
|
|
|
61
62
|
this.data = data;
|
|
62
63
|
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
63
64
|
this.isSelf = data.uidFrom == "0";
|
|
64
|
-
this.
|
|
65
|
+
this.type = isGroup ? ThreadType.Group : ThreadType.User;
|
|
65
66
|
if (data.idTo == "0")
|
|
66
67
|
data.idTo = uid;
|
|
67
68
|
if (data.uidFrom == "0")
|
package/dist/models/Undo.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
1
2
|
export type TUndoContent = {
|
|
2
3
|
globalMsgId: number;
|
|
3
4
|
cliMsgId: number;
|
|
@@ -29,6 +30,6 @@ export declare class Undo {
|
|
|
29
30
|
data: TUndo;
|
|
30
31
|
threadId: string;
|
|
31
32
|
isSelf: boolean;
|
|
32
|
-
|
|
33
|
+
type: ThreadType;
|
|
33
34
|
constructor(uid: string, data: TUndo, isGroup: boolean);
|
|
34
35
|
}
|
package/dist/models/Undo.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
1
2
|
export class Undo {
|
|
2
3
|
constructor(uid, data, isGroup) {
|
|
3
4
|
this.data = data;
|
|
4
5
|
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
5
6
|
this.isSelf = data.uidFrom == "0";
|
|
6
|
-
this.
|
|
7
|
+
this.type = isGroup ? ThreadType.Group : ThreadType.User;
|
|
7
8
|
if (data.idTo == "0")
|
|
8
9
|
data.idTo = uid;
|
|
9
10
|
if (data.uidFrom == "0")
|