gab-social/app/services/delete_chat_message_service.rb

13 lines
325 B
Ruby
Raw Normal View History

2020-12-16 00:31:30 +00:00
# frozen_string_literal: true
class DeleteChatMessageService < BaseService
def call(account, chatMessageId)
@chat = ChatMessage.where(from_account: account).find(chatMessageId)
# : todo :
# make sure last_chat_message_id in chat_account_conversation gets set to last
@chat.destroy!
end
end