Skip to content

Commit e4413c9

Browse files
Update pkg/connector/events.go
Co-authored-by: Rajeh Taher <[email protected]>
1 parent 584bbb1 commit e4413c9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pkg/connector/events.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,13 @@ func (evt *WAUndecryptableMessage) ConvertMessage(ctx context.Context, portal *b
340340
}
341341
content := &undecryptableMessageContent
342342
if evt.Type == events.UnavailableTypeViewOnce {
343-
verb := "received"
344-
if evt.Info.IsFromMe {
345-
verb = "sent"
346-
}
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-
}
343+
verb := "sent"
344+
extra := ""
345+
if !evt.Info.IsFromMe {
346+
verb = "received"
347+
extra = " For added privacy, you can only open it on the WhatsApp app."
348+
}
349+
body := fmt.Sprintf("You %s a view once message.%s", verb, extra)
351350
content = &event.MessageEventContent{
352351
MsgType: event.MsgNotice,
353352
Body: body,

0 commit comments

Comments
 (0)