Skip to content

Commit 5c699c4

Browse files
authored
send: fix revoking newsletter messages (#762)
1 parent c0c2e21 commit 5c699c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

send.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,10 @@ func (cli *Client) sendNewsletter(to types.JID, id types.MessageID, message *waE
588588
Content: plaintext,
589589
Attrs: waBinary.Attrs{},
590590
}
591-
if mediaType := getMediaTypeFromMessage(message); mediaType != "" {
592-
plaintextNode.Attrs["mediatype"] = mediaType
591+
if message != nil {
592+
if mediaType := getMediaTypeFromMessage(message); mediaType != "" {
593+
plaintextNode.Attrs["mediatype"] = mediaType
594+
}
593595
}
594596
node := waBinary.Node{
595597
Tag: "message",

0 commit comments

Comments
 (0)