Updated Introduction/onboarding flow

• Updated:
- Introduction/onboarding flow

• Added:
- autoJoinGroup to default "Introduce Yourself" group in gab.com if you post the welcome post in introduction last slide
This commit is contained in:
mgabdev
2020-07-14 22:31:54 -05:00
parent 0eb3ae2dfa
commit de834cd586
11 changed files with 236 additions and 65 deletions

View File

@@ -28,6 +28,7 @@ class PostStatusService < BaseService
@text = @options[:text] || ''
@markdown = @options[:markdown] if @account.is_pro
@in_reply_to = @options[:thread]
@autoJoinGroup = @options[:autoJoinGroup] || false
return idempotency_duplicate if idempotency_given? && idempotency_duplicate?
@@ -104,6 +105,7 @@ class PostStatusService < BaseService
group_id = @options[:group_id]
return if group_id.blank?
return if @autoJoinGroup
raise GabSocial::ValidationError, I18n.t('statuses.not_a_member_of_group') if not GroupAccount.where(account: @account, group_id: group_id).exists?
end