Forwarding other people's messages only

This commit is contained in:
Adhiraj
2020-07-29 22:56:12 +05:30
parent 3849ecd9ae
commit 85987a574d
2 changed files with 8 additions and 1 deletions

View File

@@ -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(

View File

@@ -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')
})