whatsapp-web-reveng
whatsapp-web-reveng copied to clipboard
sendTextMessage not working
Response
I am facing the same
@merbekta Did you succeeded on fixing this issue?
Show the code you’re using to send messages
Show the code you’re using to send messages
Hello! My code?
def sendTextMessage(self, number, text):
messageId = "3EB0"+binascii.hexlify(Random.get_random_bytes(8)).upper()
messageTag = str(getTimestamp())
messageParams = {"key": {"fromMe": True, "remoteJid": number + "@s.whatsapp.net", "id": messageId},"messageTimestamp": getTimestamp(), "status": 1, "message": {"conversation": text}}
msgData = ["action", {"type": "relay", "epoch": str(self.messageSentCount)},[["message", None, WAWebMessageInfo.encode(messageParams)]]]
encryptedMessage = WhatsAppEncrypt(self.loginInfo[self.instance]["key"]["encKey"], self.loginInfo[self.instance]["key"]["macKey"],whatsappWriteBinary(msgData))
payload = bytearray(messageId) + bytearray(",") + bytearray(to_bytes(WAMetrics.MESSAGE, 1)) + bytearray([0x80]) + encryptedMessage
self.messageSentCount = self.messageSentCount + 1
self.messageQueue[messageId] = {"desc": "__sending"}
self.activeWs.send(payload, websocket.ABNF.OPCODE_BINARY)
@merbekta Did you succeeded on fixing this issue?
I couldn't
Hello @kaykyr Have you successfully implemented this in python???