mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Forwarding other people's messages only
This commit is contained in:
@@ -213,7 +213,10 @@ export default class WhatsAppWebMessages extends WhatsAppWebGroups {
|
||||
|
||||
key = MessageType.extendedText
|
||||
}
|
||||
content[key].contextInfo = { forwardingScore: (score+1), isForwarded: true }
|
||||
|
||||
if (!message.key.fromMe) content[key].contextInfo = { forwardingScore: (score+1), isForwarded: true }
|
||||
else content[key].contextInfo = {}
|
||||
|
||||
return this.sendGenericMessage (id, content, {})
|
||||
}
|
||||
async sendMessage(
|
||||
|
||||
@@ -146,6 +146,10 @@ WAClientTest('Misc', (client) => {
|
||||
assert.ok(response)
|
||||
assert.rejects(client.getProfilePicture('abcd@s.whatsapp.net'))
|
||||
})
|
||||
it('should send typing indicator', async () => {
|
||||
const response = await client.updatePresence(testJid, Presence.composing)
|
||||
assert.ok(response)
|
||||
})
|
||||
it('should mark a chat unread', async () => {
|
||||
await client.sendReadReceipt(testJid, null, 'unread')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user