Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
337
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
23
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
41b491fa
Commit
41b491fa
authored
4 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
refactor: Use Set
parent
667d58ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/remote/activitypub/deliver-manager.ts
+3
-3
3 additions, 3 deletions
src/remote/activitypub/deliver-manager.ts
with
3 additions
and
3 deletions
src/remote/activitypub/deliver-manager.ts
+
3
−
3
View file @
41b491fa
...
...
@@ -76,7 +76,7 @@ export default class DeliverManager {
public
async
execute
()
{
if
(
!
Users
.
isLocalUser
(
this
.
actor
))
return
;
const
inboxes
:
string
[]
=
[]
;
const
inboxes
=
new
Set
<
string
>
()
;
// build inbox list
for
(
const
recipe
of
this
.
recipes
)
{
...
...
@@ -89,13 +89,13 @@ export default class DeliverManager {
for
(
const
following
of
followers
)
{
if
(
Followings
.
isRemoteFollower
(
following
))
{
const
inbox
=
following
.
followerSharedInbox
||
following
.
followerInbox
;
if
(
!
inboxes
.
includes
(
inbox
))
inboxes
.
push
(
inbox
);
inboxes
.
add
(
inbox
);
}
}
}
else
if
(
isDirect
(
recipe
))
{
// direct deliver
const
inbox
=
recipe
.
to
.
inbox
;
if
(
inbox
&&
!
inboxes
.
includes
(
inbox
))
inboxes
.
push
(
inbox
);
if
(
inbox
)
inboxes
.
add
(
inbox
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment