Do not exchange XMPP contacts when turned off by inviter
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
Râu Cao
2023-04-04 12:45:13 +02:00
parent 62cd0eb7d1
commit 595bb03c5a
2 changed files with 17 additions and 1 deletions

View File

@@ -63,7 +63,10 @@ class User < ApplicationRecord
return if Rails.env.development?
if inviter.present?
exchange_xmpp_contact_with_inviter if Setting.ejabberd_enabled?
if Setting.ejabberd_enabled? &&
inviter.pref_enabled?("xmpp:exchange_contacts_with_invitees")
exchange_xmpp_contact_with_inviter
end
end
end