whatsapp-web-reveng icon indicating copy to clipboard operation
whatsapp-web-reveng copied to clipboard

Finally I Success send message! but there is a problem about messageTimestamp

Open kevincollin opened this issue 7 years ago • 14 comments

Hello @sigalor ,

Thank you, I have successfully sent text message to the contact on my WhatsApp!!

but there was a problem.. something wrong with the delivery itself.

I have a problem with the time that the message shows (messageTimestamp).

---I attach the screenshot whatsapp-web-small

The problem is if I fill the messageTimestamp with timestamp type seconds, sometimes the message cannot be sent OR

if the message could be sent, the sending date on the sender's smartphone is WRONG

the time is exceeds today's date, for example: March 11, 238529416.

(For the recipient of the message, the displayed time does not experience problems. The time shows today / the results are correct).

I used to think that the messageTimestamp data type using uint64, but in the Python programming language it only provides long data types. was it right??

Do you have any ideas, insights or input for this problem? to prevent wrong sender's time message

Please help, thank you Sigalor

kevincollin avatar Oct 11 '18 02:10 kevincollin

Please help too master @Rhymen @wiomoc @tiwarishrijan @valga @SuperSandro2000 thank you so much

kevincollin avatar Oct 11 '18 03:10 kevincollin

@kevincollin Can you paste your reference code here,,,

tiwarishrijan avatar Oct 11 '18 08:10 tiwarishrijan

@tiwarishrijan , this is my sendTextMessage 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["key"]["encKey"], self.loginInfo["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)```

kevincollin avatar Oct 11 '18 09:10 kevincollin

I am also stuck onto the same place, as sometime code is working and sometime code is not working. I also tried implementing Skew but same result.

tiwarishrijan avatar Oct 11 '18 12:10 tiwarishrijan

I am also stuck onto the same place, as sometime code is working and sometime code is not working. I also tried implementing Skew but same result.

is the delivery date have a relation with the format of writing binary messages? or the encode process? @tiwarishrijan

kevincollin avatar Oct 12 '18 07:10 kevincollin

I am also stuck onto the same place, as sometime code is working and sometime code is not working. I also tried implementing Skew but same result.

is the delivery date have a relation with the format of writing binary messages? or the encode process? @tiwarishrijan

Till now it seems like issue with the binary encoding, Please do let me know if you find something..

tiwarishrijan avatar Oct 22 '18 13:10 tiwarishrijan

I am also stuck onto the same place, as sometime code is working and sometime code is not working. I also tried implementing Skew but same result.

is the delivery date have a relation with the format of writing binary messages? or the encode process? @tiwarishrijan

Till now it seems like issue with the binary encoding, Please do let me know if you find something..

oke.

kevincollin avatar Oct 25 '18 08:10 kevincollin

Hello @sigalor ,

Thank you, I have successfully sent text message to the contact on my WhatsApp!!

but there was a problem.. something wrong with the delivery itself.

I have a problem with the time that the message shows (messageTimestamp).

---I attach the screenshot whatsapp-web-small

The problem is if I fill the messageTimestamp with timestamp type seconds, sometimes the message cannot be sent OR

if the message could be sent, the sending date on the sender's smartphone is WRONG

the time is exceeds today's date, for example: March 11, 238529416.

(For the recipient of the message, the displayed time does not experience problems. The time shows today / the results are correct).

I used to think that the messageTimestamp data type using uint64, but in the Python programming language it only provides long data types. was it right??

Do you have any ideas, insights or input for this problem? to prevent wrong sender's time message

Please help, thank you Sigalor

Hello,

How did you send message using this function? Can you help me,

Regards

demontara avatar Nov 07 '18 20:11 demontara

Solution for sending messages?

tigsdev avatar Nov 11 '18 21:11 tigsdev

how you call this method??? where in whatsapp_web_backend? how initialization class ?? please i want see it

bottookku avatar Feb 15 '19 10:02 bottookku

@kevincollin Were you able to figure out this issue?

shashwat001 avatar Jun 18 '19 12:06 shashwat001

can you describe please how you sent message?

SwapnilSoni1999 avatar May 14 '20 10:05 SwapnilSoni1999

Hello guys! I'm having the same problem with mesage timestamp. Did someone find a solution?

jonathanmsch avatar Jun 14 '20 20:06 jonathanmsch

Hello guys! I'm having the same problem with mesage timestamp. Did someone find a solution?

do you know the solution for sending text?

arisawali2014 avatar Oct 20 '20 01:10 arisawali2014