mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 18:23:58 +02:00
parent
21986a2168
commit
b394328eb1
2 changed files with 16 additions and 2 deletions
|
@ -360,12 +360,14 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
|
|
||||||
reply: note.replyId ? this.pack(note.reply ?? note.replyId, me, {
|
reply: note.replyId ? this.pack(note.reply ?? note.replyId, me, {
|
||||||
detail: false,
|
detail: false,
|
||||||
|
skipHide: opts.skipHide,
|
||||||
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
||||||
_hint_: options?._hint_,
|
_hint_: options?._hint_,
|
||||||
}) : undefined,
|
}) : undefined,
|
||||||
|
|
||||||
renote: note.renoteId ? this.pack(note.renote ?? note.renoteId, me, {
|
renote: note.renoteId ? this.pack(note.renote ?? note.renoteId, me, {
|
||||||
detail: true,
|
detail: true,
|
||||||
|
skipHide: opts.skipHide,
|
||||||
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
withReactionAndUserPairCache: opts.withReactionAndUserPairCache,
|
||||||
_hint_: options?._hint_,
|
_hint_: options?._hint_,
|
||||||
}) : undefined,
|
}) : undefined,
|
||||||
|
|
|
@ -145,6 +145,18 @@ describe('Streaming', () => {
|
||||||
assert.strictEqual(fired, true);
|
assert.strictEqual(fired, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('フォローしているユーザーの visibility: followers な投稿への返信が流れる', async () => {
|
||||||
|
const note = await api('notes/create', { text: 'foo', visibility: 'followers' }, kyoko);
|
||||||
|
|
||||||
|
const fired = await waitFire(
|
||||||
|
ayano, 'homeTimeline', // ayano:home
|
||||||
|
() => api('notes/create', { text: 'bar', visibility: 'followers', replyId: note.body.id }, kyoko), // kyoko posts
|
||||||
|
msg => msg.type === 'note' && msg.body.userId === kyoko.id && msg.body.reply.text === 'foo',
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.strictEqual(fired, true);
|
||||||
|
});
|
||||||
|
|
||||||
test('フォローしていないユーザーの投稿は流れない', async () => {
|
test('フォローしていないユーザーの投稿は流れない', async () => {
|
||||||
const fired = await waitFire(
|
const fired = await waitFire(
|
||||||
kyoko, 'homeTimeline', // kyoko:home
|
kyoko, 'homeTimeline', // kyoko:home
|
||||||
|
|
Loading…
Reference in a new issue