accounts approved, video player testing, bookmark collections
This commit is contained in:
mgabdev
2020-12-17 01:34:00 -05:00
parent 04053c0e31
commit 5a37a7090e
88 changed files with 688 additions and 395 deletions

View File

@@ -2,6 +2,8 @@
class AppSignUpService < BaseService
def call(app, params)
return unless allowed_registrations?
user_params = params.slice(:email, :password, :agreement, :locale)
account_params = params.slice(:username)
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params))
@@ -12,4 +14,9 @@ class AppSignUpService < BaseService
expires_in: Doorkeeper.configuration.access_token_expires_in,
use_refresh_token: Doorkeeper.configuration.refresh_token_enabled?)
end
def allowed_registrations?
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode
end
end

View File

@@ -3,6 +3,14 @@
require 'rubygems/package'
# : todo :
# albums
# bookmarks
# bookmark collections
# chat messages
# chat conversations
# joined group
# removed groups
class BackupService < BaseService
attr_reader :account, :backup, :collection

View File

@@ -121,7 +121,7 @@ class PostStatusService < BaseService
raise GabSocial::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > 4 || @options[:poll].present?
@account.media_attachments.connection.stick_to_master!
# @account.media_attachments.connection.stick_to_master!
@media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i))
hasVideoOrGif = @media.find(&:video?) || @media.find(&:gifv?)

View File

@@ -16,9 +16,7 @@ class SuspendAccountService < BaseService
list_accounts
media_attachments
mute_relationships
chat_mute_relationships
muted_by_relationships
chat_muted_by_relationships
notifications
owned_lists
passive_relationships