whatsapp-gpt icon indicating copy to clipboard operation
whatsapp-gpt copied to clipboard

Specifically answered messages do not work

Open specialOne-coder opened this issue 2 years ago • 4 comments

When someone sends me a message, everything works fine, the message is sent to GPT which responds very well, but when someone responds to a specific message, Nothing works, the message is not displayed in the go console and is not sent to gpt.

I think the events are not getting the specific responses, does anyone have any idea what is going on and can help please ?

specialOne-coder avatar Jan 30 '23 23:01 specialOne-coder

are you talking about whenever someone replies to your message by swiping left on it, it doesn't get recognized by the go server?

kazzastic avatar Jan 31 '23 17:01 kazzastic

yes, finally find the solution by doing this :

       newMessage = v.Message
       quoted := newMessage.ExtendedTextMessage
       var msg string
       if quoted == nil {
		msg = newMessage.GetConversation()
	} else {
		msg = quoted.GetText()
	}
		...

are you talking about whenever someone replies to your message by swiping left on it, it doesn't get recognized by the go server?

specialOne-coder avatar Jan 31 '23 18:01 specialOne-coder

maybe highlight the issue and make a PR for this solution.

kazzastic avatar Jan 31 '23 18:01 kazzastic

maybe highlight the issue and make a PR for this solution.

Yes, I just made a pull request with other improvements, in particular the use of an api key instead of going through a browser each time. This improves the response time and the bugs related to the browsers : https://github.com/danielgross/whatsapp-gpt/pull/50

specialOne-coder avatar Jan 31 '23 18:01 specialOne-coder