tulir / whatsmeow

Go library for the WhatsApp web multidevice API
https://go.mau.fi/whatsmeow
Mozilla Public License 2.0
2.29k stars 429 forks source link

"CallLogMesssage" (?) #634

Closed idontneedgithub closed 3 months ago

idontneedgithub commented 3 months ago

I believe this is either a mistype in the protobuf or an error in the library It seems to be never set even when "call" messages (missed call and such) are encountered

idontneedgithub commented 3 months ago

https://pkg.go.dev/go.mau.fi/whatsmeow/proto/waE2E#Message

tulir commented 3 months ago

The protobuf schema is decided by whatsapp, the library doesn't have errors or mistypes

idontneedgithub commented 3 months ago

am i using the wrong type then? im expecting some call log messages (the one it sends when the other party misses the call for example) but it doesnt seem to be present in this parameter at least not on the historysync updates

tulir commented 3 months ago

I'd guess that's not a real message type that gets sent, but rather something that's generated by clients (and maybe included in history syncs when logging into a new device)

idontneedgithub commented 3 months ago

Im positive its coming from this https://pkg.go.dev/go.mau.fi/whatsmeow/proto/waSyncAction#CallLogRecord

Thanks for the clarification, i'll stop it here

tulir commented 3 months ago

Sync actions are not messages, they're an entirely different thing called app state. Some app state types have proper events in whatsmeow (https://github.com/tulir/whatsmeow/blob/main/types/events/appstate.go), but not all of them do. For ones that don't, you can either listen to the raw *events.AppState or make a PR to add a proper event for it

idontneedgithub commented 3 months ago

I've tried catching *waSyncAction.CallLogAction since the historysync parameter came empty and it seems it wasn't sent, is there any default setting preventing call logs from being requested or its just whatsapp being fussy?