Comparing version 1.1.1 to 1.1.2
@@ -98,3 +98,9 @@ import EventEmitter from "events"; | ||
for (const msg of groupMsgs) { | ||
if (msg.at == 0) { | ||
if (typeof msg.content == "object" && msg.content.hasOwnProperty("deleteMsg")) { | ||
const undoObject = new Undo(msg, true); | ||
if (undoObject.isSelf && !this.selfListen) | ||
continue; | ||
this.emit("undo", undoObject); | ||
} | ||
else { | ||
const messageObject = new GroupMessage(msg); | ||
@@ -106,8 +112,2 @@ if (messageObject.isSelf && !this.selfListen) | ||
} | ||
else { | ||
const undoObject = new Undo(msg, true); | ||
if (undoObject.isSelf && !this.selfListen) | ||
continue; | ||
this.emit("undo", undoObject); | ||
} | ||
} | ||
@@ -114,0 +114,0 @@ } |
import { compare } from "semver"; | ||
import { logger } from "./utils.js"; | ||
import { appContext } from "./context.js"; | ||
const VERSION = "1.1.1"; | ||
const VERSION = "1.1.2"; | ||
const NPM_REGISTRY = "https://registry.npmjs.org/zca-js"; | ||
@@ -6,0 +6,0 @@ export async function checkUpdate() { |
{ | ||
"name": "zca-js", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Unofficial Zalo API for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -22,3 +22,3 @@ # ZCA-JS | ||
{ | ||
cookies: "your_cookies_here", | ||
cookie: "your_cookie_here", | ||
imei: "your_imei_here", | ||
@@ -43,3 +43,3 @@ userAgent: "your_user_agent_here", | ||
{ | ||
cookies: JSON.parse(fs.readFileSync("./cookies.json", "utf-8")), | ||
cookie: JSON.parse(fs.readFileSync("./cookies.json", "utf-8")), | ||
imei: "your_imei_here", | ||
@@ -57,5 +57,5 @@ userAgent: "your_user_agent_here", | ||
- `cookies`: Your Zalo cookies. You can get it by using [J2TEAM Cookies](https://chromewebstore.google.com/detail/j2team-cookies/okpidcojinmlaakglciglbpcpajaibco) extension or by using browser developer tools. | ||
- `cookie`: Your Zalo cookie. You can get it by using [J2TEAM Cookies](https://chromewebstore.google.com/detail/j2team-cookies/okpidcojinmlaakglciglbpcpajaibco) extension or by using browser developer tools. | ||
- `imei`: Your IMEI created by Zalo. You can get it using browser developer tools: `localStorage.getItem('z_uuid')` or `localStorage.getItem('sh_z_uuid')`. | ||
- `userAgent`: Your browser user agent. Better be from the same browser you get cookies. | ||
- `userAgent`: Your browser user agent. Better be from the same browser you get cookie. | ||
- `selfListen`: Listen for messages sent by yourself. Default is `false`. | ||
@@ -62,0 +62,0 @@ - `checkUpdate`: Check for zca-js update. Default is `true`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120288