mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-16 06:52:00 +01:00
Handle poll creation message v3
This commit is contained in:
parent
140eea0bd2
commit
f1c07b6b49
1 changed files with 4 additions and 2 deletions
|
@ -440,7 +440,7 @@ func getMessageType(waMsg *waProto.Message) string {
|
||||||
return "reaction"
|
return "reaction"
|
||||||
case waMsg.EncReactionMessage != nil:
|
case waMsg.EncReactionMessage != nil:
|
||||||
return "encrypted reaction"
|
return "encrypted reaction"
|
||||||
case waMsg.PollCreationMessage != nil || waMsg.PollCreationMessageV2 != nil:
|
case waMsg.PollCreationMessage != nil || waMsg.PollCreationMessageV2 != nil || waMsg.PollCreationMessageV3 != nil:
|
||||||
return "poll create"
|
return "poll create"
|
||||||
case waMsg.PollUpdateMessage != nil:
|
case waMsg.PollUpdateMessage != nil:
|
||||||
return "poll update"
|
return "poll update"
|
||||||
|
@ -561,6 +561,8 @@ func (portal *Portal) convertMessage(intent *appservice.IntentAPI, source *User,
|
||||||
return portal.convertPollCreationMessage(intent, waMsg.GetPollCreationMessage())
|
return portal.convertPollCreationMessage(intent, waMsg.GetPollCreationMessage())
|
||||||
case waMsg.PollCreationMessageV2 != nil:
|
case waMsg.PollCreationMessageV2 != nil:
|
||||||
return portal.convertPollCreationMessage(intent, waMsg.GetPollCreationMessageV2())
|
return portal.convertPollCreationMessage(intent, waMsg.GetPollCreationMessageV2())
|
||||||
|
case waMsg.PollCreationMessageV3 != nil:
|
||||||
|
return portal.convertPollCreationMessage(intent, waMsg.GetPollCreationMessageV3())
|
||||||
case waMsg.PollUpdateMessage != nil:
|
case waMsg.PollUpdateMessage != nil:
|
||||||
return portal.convertPollUpdateMessage(intent, source, info, waMsg.GetPollUpdateMessage())
|
return portal.convertPollUpdateMessage(intent, source, info, waMsg.GetPollUpdateMessage())
|
||||||
case waMsg.ImageMessage != nil:
|
case waMsg.ImageMessage != nil:
|
||||||
|
@ -4126,7 +4128,7 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event, timing
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dbMsgType := database.MsgNormal
|
dbMsgType := database.MsgNormal
|
||||||
if msg.PollCreationMessage != nil || msg.PollCreationMessageV2 != nil {
|
if msg.PollCreationMessage != nil || msg.PollCreationMessageV2 != nil || msg.PollCreationMessageV3 != nil {
|
||||||
dbMsgType = database.MsgMatrixPoll
|
dbMsgType = database.MsgMatrixPoll
|
||||||
} else if msg.EditedMessage == nil {
|
} else if msg.EditedMessage == nil {
|
||||||
portal.MarkDisappearing(nil, origEvtID, time.Duration(portal.ExpirationTime)*time.Second, time.Now())
|
portal.MarkDisappearing(nil, origEvtID, time.Duration(portal.ExpirationTime)*time.Second, time.Now())
|
||||||
|
|
Loading…
Reference in a new issue