diff --git a/src/WAClient/Messages.ts b/src/WAClient/Messages.ts index b5b30b3..69c4fd6 100644 --- a/src/WAClient/Messages.ts +++ b/src/WAClient/Messages.ts @@ -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( diff --git a/src/WAClient/Tests.ts b/src/WAClient/Tests.ts index 7f042df..667278c 100644 --- a/src/WAClient/Tests.ts +++ b/src/WAClient/Tests.ts @@ -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') })