Don't queue job when service isn't enabled
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Râu Cao 2025-05-17 17:46:22 +04:00
parent 587f940764
commit c3b845b18f
Signed by: raucao
GPG Key ID: 37036C356E56CC51

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