Don't queue job when service isn't enabled
This commit is contained in:
parent
f0b541ee50
commit
b3b7fe6359
@ -36,7 +36,7 @@ class SettingsController < ApplicationController
|
|||||||
if @user.avatar_new.present?
|
if @user.avatar_new.present?
|
||||||
if store_user_avatar
|
if store_user_avatar
|
||||||
LdapManager::UpdateAvatar.call(user: @user)
|
LdapManager::UpdateAvatar.call(user: @user)
|
||||||
XmppSetAvatarJob.perform_later(user: @user)
|
XmppSetAvatarJob.perform_later(user: @user) if Setting.ejabberd_enabled?
|
||||||
else
|
else
|
||||||
@validation_errors = @user.errors
|
@validation_errors = @user.errors
|
||||||
render :show, status: :unprocessable_entity and return
|
render :show, status: :unprocessable_entity and return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user