Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gab
social
gab-social
Commits
1f0f9641
Commit
1f0f9641
authored
Aug 20, 2019
by
2458773093
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
group posts in feed db builder
parent
213d5862
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
app/models/concerns/account_interactions.rb
app/models/concerns/account_interactions.rb
+3
-0
app/models/status.rb
app/models/status.rb
+1
-1
No files found.
app/models/concerns/account_interactions.rb
View file @
1f0f9641
...
...
@@ -71,6 +71,9 @@ module AccountInteractions
has_many
:following
,
->
{
order
(
'follows.id desc'
)
},
through: :active_relationships
,
source: :target_account
has_many
:followers
,
->
{
order
(
'follows.id desc'
)
},
through: :passive_relationships
,
source: :account
has_many
:group_accounts
,
inverse_of: :account
,
dependent: :destroy
,
source: :account
has_many
:groups
,
through: :group_accounts
# Block relationships
has_many
:block_relationships
,
class_name:
'Block'
,
foreign_key:
'account_id'
,
dependent: :destroy
has_many
:blocking
,
->
{
order
(
'blocks.id desc'
)
},
through: :block_relationships
,
source: :target_account
...
...
app/models/status.rb
View file @
1f0f9641
...
...
@@ -283,7 +283,7 @@ class Status < ApplicationRecord
end
def
as_home_timeline
(
account
)
where
(
account:
[
account
]
+
account
.
following
).
where
(
visibility:
[
:public
,
:unlisted
,
:private
])
where
(
account:
[
account
]
+
account
.
following
).
or
(
where
(
group:
account
.
groups
)).
where
(
visibility:
[
:public
,
:unlisted
,
:private
])
end
def
as_group_timeline
(
group
)
...
...
Developer
🥊
@mgabdev
mentioned in commit
446fe7ec
·
Aug 29, 2019
mentioned in commit
446fe7ec
mentioned in commit 446fe7ecd015d2c5954fa1036c0e742dfda08963
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment