mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Unread fix + regen QR code changes + Browser message decoding
This commit is contained in:
@@ -4,13 +4,11 @@ import * as fs from 'fs'
|
||||
import * as assert from 'assert'
|
||||
|
||||
import { decodeMediaMessage, validateJIDForSending } from './Utils'
|
||||
import { promiseTimeout } from '../WAConnection/Utils'
|
||||
import { promiseTimeout, createTimeout } from '../WAConnection/Utils'
|
||||
|
||||
require ('dotenv').config () // dotenv to load test jid
|
||||
const testJid = process.env.TEST_JID || '1234@s.whatsapp.net' // set TEST_JID=xyz@s.whatsapp.net in a .env file in the root directory
|
||||
|
||||
const createTimeout = (timeout) => new Promise(resolve => setTimeout(resolve, timeout))
|
||||
|
||||
async function sendAndRetreiveMessage(client: WAClient, content, type: MessageType, options: MessageOptions = {}) {
|
||||
const response = await client.sendMessage(testJid, content, type, options)
|
||||
assert.strictEqual(response.status, 200)
|
||||
|
||||
Reference in New Issue
Block a user