forked from glitch-soc/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quotable concern stub, i think this is where you put this?
- Loading branch information
1 parent
bdf152d
commit 7dd2591
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
# Determine whether a status can be quoted by a given account | ||
module Status::QuotableConcern | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
def quotable? | ||
if current_user? | ||
!noquote && !filtered && distributable? | ||
else | ||
false | ||
end | ||
end | ||
end | ||
|
||
def noquote | ||
# whether the account has #NoQuote tag in bio | ||
false | ||
end | ||
|
||
def filtered | ||
# whether the account has filtered notifications from us | ||
false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters