Re-rename "ejabberd" service to "xmpp"

Shouldn't matter which implementation is integrated if someone adds
another one
This commit is contained in:
Râu Cao
2023-04-04 12:29:39 +02:00
parent f19baaf22a
commit 62cd0eb7d1
3 changed files with 8 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ class User < ApplicationRecord
end
def devise_after_confirmation
enable_service %w[ discourse ejabberd gitea mediawiki ]
enable_service %w[ discourse gitea mediawiki xmpp ]
#TODO enable in development when we have easy setup of ejabberd etc.
return if Rails.env.development?
@@ -137,12 +137,12 @@ class User < ApplicationRecord
def pref_enabled?(key)
value = preferences.dig(*key.split(":"))
[true, "true", 1, "enabled"].include?(value)
[true, "true", "enabled", 1].include?(value)
end
def exchange_xmpp_contact_with_inviter
return unless inviter.services_enabled.include?("ejabberd") &&
services_enabled.include?("ejabberd")
return unless inviter.services_enabled.include?("xmpp") &&
services_enabled.include?("xmpp")
XmppExchangeContactsJob.perform_later(inviter, self.cn, self.ou)
end