feat: API Endpoints to update message status (#11387)
- Added an api endpoint for update message status ( available only for api inboxes ) - Moved message status management to a service. - Handles case where read status arrive before delivered fixes: #10314 , #9962
This commit is contained in:
@@ -15,7 +15,7 @@ class Conversations::UpdateMessageStatusJob < ApplicationJob
|
||||
conversation.messages.where(status: %w[sent delivered])
|
||||
.where.not(message_type: 'incoming')
|
||||
.where('messages.created_at <= ?', timestamp).find_each do |message|
|
||||
message.update!(status: status)
|
||||
Messages::StatusUpdateService.new(message, status).perform
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user