chore: Update dependencies (#1173)
This commit is contained in:
@@ -63,7 +63,7 @@ class Channel::TwitterProfile < ApplicationRecord
|
||||
def unsubscribe
|
||||
### Fix unsubscription with new endpoint
|
||||
unsubscribe_response = twitter_client.remove_subscription(user_id: profile_id)
|
||||
Rails.logger.info 'TWITTER_UNSUBSCRIBE: ' + unsubscribe_response.body.to_s
|
||||
Rails.logger.info "TWITTER_UNSUBSCRIBE: #{unsubscribe_response.body}"
|
||||
rescue StandardError => e
|
||||
Rails.logger.info e
|
||||
end
|
||||
|
||||
@@ -54,7 +54,7 @@ module Featurable
|
||||
config = InstallationConfig.find_by(name: 'ACCOUNT_LEVEL_FEATURE_DEFAULTS')
|
||||
return true if config.blank?
|
||||
|
||||
features_to_enabled = config.value.select { |f| f[:enabled] }.map { |f| f[:name] }
|
||||
features_to_enabled = config.value.select { |f| f[:enabled] }.pluck(:name)
|
||||
enable_features(*features_to_enabled)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,13 +48,13 @@ class Conversation < ApplicationRecord
|
||||
|
||||
has_many :messages, dependent: :destroy, autosave: true
|
||||
|
||||
before_create :set_display_id, unless: :display_id?
|
||||
before_create :set_bot_conversation
|
||||
after_create_commit :notify_conversation_creation
|
||||
after_save :run_round_robin
|
||||
before_create :set_display_id, unless: :display_id?
|
||||
# wanted to change this to after_update commit. But it ended up creating a loop
|
||||
# reinvestigate in future and identity the implications
|
||||
after_update :notify_status_change, :create_activity
|
||||
after_create_commit :notify_conversation_creation
|
||||
after_save :run_round_robin
|
||||
|
||||
acts_as_taggable_on :labels
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Integrations::App
|
||||
def enabled?(account)
|
||||
case params[:id]
|
||||
when 'slack'
|
||||
account.hooks.where(app_id: id).exists?
|
||||
account.hooks.exists?(app_id: id)
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
@@ -71,8 +71,9 @@ class Notification < ApplicationRecord
|
||||
|
||||
def process_notification_delivery
|
||||
Notification::PushNotificationJob.perform_later(self)
|
||||
|
||||
# Queuing after 2 minutes so that we won't send emails for read notifications
|
||||
Notification::EmailNotificationJob.set(wait: 2.minutes).perform_later(self)
|
||||
# Should we do something about the case where user subscribed to both push and email ?
|
||||
# In future, we could probably add condition here to enqueue the job for 30 seconds later
|
||||
# when push enabled and then check in email job whether notification has been read already.
|
||||
Notification::EmailNotificationJob.perform_later(self)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -127,8 +127,7 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def serializable_hash(options = nil)
|
||||
serialized_user = super(options).merge(confirmed: confirmed?)
|
||||
serialized_user
|
||||
super(options).merge(confirmed: confirmed?)
|
||||
end
|
||||
|
||||
def push_event_data
|
||||
|
||||
Reference in New Issue
Block a user