Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
336
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
f1d9bb2c
Unverified
Commit
f1d9bb2c
authored
2 months ago
by
piuvas
Browse files
Options
Downloads
Patches
Plain Diff
requested changes
parent
a3fc9a10
No related branches found
No related tags found
2 merge requests
!927
2025.2.2
,
!854
Clone note when adding myReaction to streamed notes.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/backend/src/server/api/stream/channel.ts
+2
-3
2 additions, 3 deletions
packages/backend/src/server/api/stream/channel.ts
with
2 additions
and
3 deletions
packages/backend/src/server/api/stream/channel.ts
+
2
−
3
View file @
f1d9bb2c
...
...
@@ -9,8 +9,8 @@ import { isUserRelated } from '@/misc/is-user-related.js';
import
{
isRenotePacked
,
isQuotePacked
}
from
'
@/misc/is-renote.js
'
;
import
type
{
Packed
}
from
'
@/misc/json-schema.js
'
;
import
type
{
JsonObject
,
JsonValue
}
from
'
@/misc/json-value.js
'
;
import
{
NoteEntityService
}
from
'
@/core/entities/NoteEntityService.js
'
;
import
type
Connection
from
'
./Connection.js
'
;
import
{
NoteEntityService
}
from
'
@/core/entities/NoteEntityService.js
'
;
/**
* Stream channel
...
...
@@ -105,7 +105,7 @@ export default abstract class Channel {
public
async
assignMyReaction
(
note
:
Packed
<
'
Note
'
>
,
noteEntityService
:
NoteEntityService
):
Promise
<
Packed
<
'
Note
'
>>
{
let
changed
=
false
;
// cloning here seems like the best solution for
a race condition
// cloning here seems like the best solution for
not sharing changes with other users.
// where multiple users shared the same myReaction. (Sharkey #877)
const
clonedNote
=
{
...
note
};
if
(
this
.
user
&&
isRenotePacked
(
note
)
&&
!
isQuotePacked
(
note
))
{
...
...
@@ -139,7 +139,6 @@ export default abstract class Channel {
}
}
export
type
MiChannelService
<
T
extends
boolean
>
=
{
shouldShare
:
boolean
;
requireCredential
:
T
;
...
...
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