Skip to content

Commit 584bbb1

Browse files
committed
remove the can open notice
1 parent 4f0b1f3 commit 584bbb1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pkg/connector/events.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,13 @@ func (evt *WAUndecryptableMessage) ConvertMessage(ctx context.Context, portal *b
344344
if evt.Info.IsFromMe {
345345
verb = "sent"
346346
}
347+
body := fmt.Sprintf("You %s a view once message.", verb)
348+
if !evt.Info.IsFromMe {
349+
body += " For added privacy, you can only open it on the WhatsApp app."
350+
}
347351
content = &event.MessageEventContent{
348352
MsgType: event.MsgNotice,
349-
Body: fmt.Sprintf("You %s a view once message. For added privacy, you can only open it on the WhatsApp app.", verb),
353+
Body: body,
350354
}
351355
}
352356
// TODO thread root for comments

pkg/msgconv/wa-media.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,15 @@ func (mc *MessageConverter) convertMediaMessage(
5858
if messageInfo.IsFromMe {
5959
verb = "sent"
6060
}
61+
body := fmt.Sprintf("You %s a view once %s.", verb, typeName)
62+
if !messageInfo.IsFromMe {
63+
body += " For added privacy, you can only open it on the WhatsApp app."
64+
}
6165
return &bridgev2.ConvertedMessagePart{
6266
Type: event.EventMessage,
6367
Content: &event.MessageEventContent{
6468
MsgType: event.MsgNotice,
65-
Body: fmt.Sprintf("You %s a view once %s. For added privacy, you can only open it on the WhatsApp app.", verb, typeName),
69+
Body: body,
6670
},
6771
}, nil
6872
}

0 commit comments

Comments
 (0)