Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit bac369e

Browse files
committed
Replace the offline piece
1 parent 38d435f commit bac369e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/net.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ func (n *OpenBazaarNode) SendChat(peerID string, chatMessage *pb.Chat) error {
616616
ctx, cancel := context.WithTimeout(context.Background(), n.OfflineMessageFailoverTimeout)
617617
defer cancel()
618618
err = n.Service.SendMessage(ctx, p, &m)
619-
if chatMessage.Flag != pb.Chat_TYPING {
619+
if err != nil && chatMessage.Flag != pb.Chat_TYPING {
620620
if err := n.SendOfflineMessage(p, nil, &m); err != nil {
621621
log.Errorf("failed to send offline message: %v", err)
622622
return err

0 commit comments

Comments
 (0)