1
0
Fork 0
mirror of https://github.com/mautrix/whatsapp.git synced 2026-07-11 00:19:04 -04:00

Compare commits

..

1 commit

Author SHA1 Message Date
Tulir Asokan
5250ddfa7d msgconv/from-whatsapp: handle v5 and v6 poll creations 2026-07-10 18:36:17 +03:00
2 changed files with 10 additions and 3 deletions

View file

@ -67,10 +67,11 @@ func getMessageType(waMsg *waE2E.Message) string {
return "encrypted comment"
case waMsg.CommentMessage != nil:
return "comment"
case waMsg.PollCreationMessage != nil || waMsg.PollCreationMessageV2 != nil || waMsg.PollCreationMessageV3 != nil:
case waMsg.PollCreationMessage != nil || waMsg.PollCreationMessageV2 != nil || waMsg.PollCreationMessageV3 != nil ||
waMsg.PollCreationMessageV5 != nil || waMsg.PollCreationMessageV6 != nil:
return "poll create"
case waMsg.PollCreationMessageV4 != nil || waMsg.PollCreationMessageV5 != nil:
return "poll create (vNext)"
case waMsg.PollCreationMessageV4 != nil:
return "poll create (v4)"
case waMsg.PollUpdateMessage != nil:
return "poll update"
case waMsg.ProtocolMessage != nil:

View file

@ -176,6 +176,12 @@ func (mc *MessageConverter) ToMatrix(
part, contextInfo = mc.convertPollCreationMessage(ctx, waMsg.PollCreationMessageV2)
case waMsg.PollCreationMessageV3 != nil:
part, contextInfo = mc.convertPollCreationMessage(ctx, waMsg.PollCreationMessageV3)
//case waMsg.PollCreationMessageV4 != nil:
// part, contextInfo = mc.convertPollCreationMessage(ctx, waMsg.PollCreationMessageV4)
case waMsg.PollCreationMessageV5 != nil:
part, contextInfo = mc.convertPollCreationMessage(ctx, waMsg.PollCreationMessageV5)
case waMsg.PollCreationMessageV6 != nil:
part, contextInfo = mc.convertPollCreationMessage(ctx, waMsg.PollCreationMessageV6)
case waMsg.PollUpdateMessage != nil:
part, contextInfo = mc.convertPollUpdateMessage(ctx, info, origSource, waMsg.PollUpdateMessage)
case waMsg.EventMessage != nil: