Progress
Albums almost done, group, chat moderation, photo, video page updates
This commit is contained in:
@@ -23,7 +23,6 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
|
||||
end
|
||||
|
||||
def hide_results?
|
||||
# : todo : where tf is this?
|
||||
(@account.user_hides_network? && current_account.id != @account.id) || (current_account && @account.blocking?(current_account))
|
||||
end
|
||||
|
||||
|
||||
@@ -19,13 +19,6 @@ class Api::V1::ChatConversationController < Api::BaseController
|
||||
end
|
||||
|
||||
def create
|
||||
# : todo :
|
||||
# check if already created
|
||||
# check if blocked
|
||||
# check if chat blocked
|
||||
# check if allow anyone to message then create with approved:true
|
||||
# unique account id, participants
|
||||
|
||||
chat_conversation_account = find_or_create_conversation
|
||||
render json: chat_conversation_account, each_serializer: REST::ChatConversationAccountSerializer
|
||||
end
|
||||
@@ -80,26 +73,8 @@ class Api::V1::ChatConversationController < Api::BaseController
|
||||
|
||||
def find_or_create_conversation
|
||||
chat = ChatConversationAccount.find_by(account: current_account, participant_account_ids: [@account.id.to_s])
|
||||
|
||||
return chat unless chat.nil?
|
||||
|
||||
chat_conversation = ChatConversation.create
|
||||
|
||||
my_chat = ChatConversationAccount.create!(
|
||||
account: current_account,
|
||||
participant_account_ids: [@account.id.to_s],
|
||||
chat_conversation: chat_conversation,
|
||||
is_approved: true
|
||||
)
|
||||
|
||||
# : todo : if multiple ids
|
||||
their_chat = ChatConversationAccount.create!(
|
||||
account: @account,
|
||||
participant_account_ids: [current_account.id.to_s],
|
||||
chat_conversation: chat_conversation,
|
||||
is_approved: false # default as request
|
||||
)
|
||||
|
||||
my_chat = CreateChatConversationService.new.call(current_account, [@account])
|
||||
return my_chat
|
||||
end
|
||||
|
||||
|
||||
@@ -34,10 +34,6 @@ class Api::V1::Groups::RemovedAccountsController < Api::BaseController
|
||||
render_empty_success
|
||||
end
|
||||
|
||||
def search
|
||||
# : todo :
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_group
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
class Api::V1::StatusesController < Api::BaseController
|
||||
include Authorization
|
||||
|
||||
# : todo : disable all oauth everything
|
||||
before_action -> { authorize_if_got_token! :read, :'read:statuses' }, except: [:create, :update, :destroy]
|
||||
before_action -> { doorkeeper_authorize! :write, :'write:statuses' }, only: [:create, :update, :destroy]
|
||||
before_action :require_user!, except: [:show, :comments, :context, :card]
|
||||
|
||||
Reference in New Issue
Block a user