Progress on DMs

Progress on DMs
This commit is contained in:
mgabdev
2020-12-19 01:33:33 -05:00
parent 47cd60f851
commit 7ec426e3d8
38 changed files with 447 additions and 197 deletions

View File

@@ -16,7 +16,11 @@ class Api::V1::ChatConversations::MessagesController < Api::BaseController
def destroy_all
if current_user.account.is_pro
@chat_conversation_account = PurgeChatMessagesService.new.call(current_user.account, @chat_conversation)
PurgeChatMessagesService.new.call(current_user.account, @chat_conversation)
@chat_conversation_account = ChatConversationAccount.where(
account: current_user.account,
chat_conversation: @chat_conversation
).first
render json: @chat_conversation_account, serializer: REST::ChatConversationAccountSerializer
else
render json: { error: 'You need to be a GabPRO member to access this' }, status: 422