Progress on deck, dms
This commit is contained in:
9
app/services/block_chat_messenger_service.rb
Normal file
9
app/services/block_chat_messenger_service.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BlockChatMessengerService < BaseService
|
||||
def call(account, target_account)
|
||||
return if account.id == target_account.id
|
||||
block = account.chat_block!(target_account)
|
||||
block
|
||||
end
|
||||
end
|
||||
9
app/services/mute_chat_messenger_service.rb
Normal file
9
app/services/mute_chat_messenger_service.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MuteChatMessengerService < BaseService
|
||||
def call(account, target_account)
|
||||
return if account.id == target_account.id
|
||||
mute = account.chat_mute!(target_account)
|
||||
mute
|
||||
end
|
||||
end
|
||||
9
app/services/unblock_chat_messenger_service.rb
Normal file
9
app/services/unblock_chat_messenger_service.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UnblockChatMessengerService < BaseService
|
||||
def call(account, target_account)
|
||||
return unless account.chat_blocking?(target_account)
|
||||
unblock = account.chat_unblock!(target_account)
|
||||
unblock
|
||||
end
|
||||
end
|
||||
8
app/services/unmute_chat_messenger_service.rb
Normal file
8
app/services/unmute_chat_messenger_service.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UnmuteChatMessengerService < BaseService
|
||||
def call(account, target_account)
|
||||
return unless account.chat_muting?(target_account)
|
||||
account.chat_unmute!(target_account)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user