Don't queue job when service isn't enabled

This commit is contained in:
2025-05-17 17:46:22 +04:00
parent 92e6b1395a
commit a71aa3fda2

View File

@@ -36,7 +36,7 @@ class SettingsController < ApplicationController
if @user.avatar_new.present?
if store_user_avatar
LdapManager::UpdateAvatar.call(user: @user)
XmppSetAvatarJob.perform_later(user: @user)
XmppSetAvatarJob.perform_later(user: @user) if Setting.ejabberd_enabled?
else
@validation_errors = @user.errors
render :show, status: :unprocessable_entity and return