Skip to content

Commit

Permalink
v2: bridge more types of messages as normal messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jun 27, 2024
1 parent be21dac commit 1366e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/connector/handlesignal.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ func (evt *Bv2ChatEvent) GetType() bridgev2.RemoteEventType {
switch innerEvt := evt.Event.(type) {
case *signalpb.DataMessage:
switch {
case innerEvt.Body != nil, innerEvt.Attachments != nil, innerEvt.Contact != nil, innerEvt.Sticker != nil:
case innerEvt.Body != nil, innerEvt.Attachments != nil, innerEvt.Contact != nil, innerEvt.Sticker != nil,
innerEvt.Payment != nil, innerEvt.GiftBadge != nil,
innerEvt.GetRequiredProtocolVersion() > uint32(signalpb.DataMessage_CURRENT),
innerEvt.GetFlags()&uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE) != 0:
return bridgev2.RemoteEventMessage
case innerEvt.Reaction != nil:
if innerEvt.Reaction.GetRemove() {
Expand Down

0 comments on commit 1366e27

Please sign in to comment.