Progress
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
# updated_at :datetime not null
|
||||
# unread_count :bigint(8) default(0), not null
|
||||
# chat_message_expiration_policy :string
|
||||
# is_muted :boolean default(FALSE), not null
|
||||
#
|
||||
|
||||
# : todo : expires
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: chat_mutes
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# account_id :integer not null
|
||||
# target_account_id :integer not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
|
||||
class ChatMute < ApplicationRecord
|
||||
include Paginable
|
||||
include RelationshipCacheable
|
||||
|
||||
belongs_to :account
|
||||
belongs_to :target_account, class_name: 'Account'
|
||||
|
||||
validates :account_id, uniqueness: { scope: :target_account_id }
|
||||
|
||||
after_commit :remove_blocking_cache
|
||||
|
||||
private
|
||||
|
||||
def remove_blocking_cache
|
||||
Rails.cache.delete("exclude_chat_account_ids_for:#{account_id}")
|
||||
end
|
||||
end
|
||||
@@ -22,6 +22,9 @@ class LinkBlock < ApplicationRecord
|
||||
Addressable::URI.parse(array[0]).normalize
|
||||
}
|
||||
url = urls.first
|
||||
|
||||
return false if url.nil?
|
||||
|
||||
link_for_fetch = TagManager.instance.normalize_link(url)
|
||||
link_for_fetch = link_for_fetch.chomp("/")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user