Skip to content

Commit fd5c60c

Browse files
committed
Fix logic for updating message thread status
1 parent d8f8947 commit fd5c60c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/pkg/services/message_thread_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (service *MessageThreadService) UpdateThread(ctx context.Context, params Me
6262
return service.tracer.WrapErrorSpan(span, stacktrace.Propagate(err, msg))
6363
}
6464

65-
if thread.OrderTimestamp.Unix() > params.Timestamp.Unix() && params.Status != entities.MessageStatusFailed {
65+
if thread.OrderTimestamp.Unix() > params.Timestamp.Unix() && thread.Status != entities.MessageStatusSending {
6666
ctxLogger.Info(fmt.Sprintf("thread [%s] has timestamp [%s] and status [%s] which is greater than timestamp [%s] for message [%s] and status [%s]", thread.ID, thread.OrderTimestamp, thread.Status, params.Timestamp, params.MessageID, params.Status))
6767
return nil
6868
}

0 commit comments

Comments
 (0)