mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-11 13:18:09 +09:00
Fix #4768
This commit is contained in:
parent
40064eab59
commit
b0fce9b791
@ -22,6 +22,8 @@ export default class extends Channel {
|
|||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
private async onNote(note: any) {
|
private async onNote(note: any) {
|
||||||
|
if (note.visibility !== 'public') return;
|
||||||
|
|
||||||
// リプライなら再pack
|
// リプライなら再pack
|
||||||
if (note.replyId != null) {
|
if (note.replyId != null) {
|
||||||
note.reply = await Notes.pack(note.replyId, this.user, {
|
note.reply = await Notes.pack(note.replyId, this.user, {
|
||||||
|
@ -594,6 +594,31 @@ describe('Streaming', () => {
|
|||||||
text: 'foo'
|
text: 'foo'
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('ホーム投稿は流れない', () => new Promise(async done => {
|
||||||
|
const alice = await signup({ username: 'alice' });
|
||||||
|
const bob = await signup({ username: 'bob' });
|
||||||
|
|
||||||
|
let fired = false;
|
||||||
|
|
||||||
|
const ws = await connectStream(alice, 'globalTimeline', ({ type, body }) => {
|
||||||
|
if (type == 'note') {
|
||||||
|
fired = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// ホーム投稿
|
||||||
|
post(bob, {
|
||||||
|
text: 'foo',
|
||||||
|
visibility: 'home'
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
assert.strictEqual(fired, false);
|
||||||
|
ws.close();
|
||||||
|
done();
|
||||||
|
}, 3000);
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('UserList Timeline', () => {
|
describe('UserList Timeline', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user