@@ -890,17 +890,35 @@ describe('Timelines', () => {
890
890
891
891
const list = await api ( 'users/lists/create' , { name : 'list' } , alice ) . then ( res => res . body ) ;
892
892
await api ( 'users/lists/push' , { listId : list . id , userId : bob . id } , alice ) ;
893
+ await api ( 'users/lists/update-membership' , { listId : list . id , userId : bob . id , withReplies : false } , alice ) ;
893
894
await sleep ( 1000 ) ;
894
895
const aliceNote = await post ( alice , { text : 'hi' } ) ;
895
896
const bobNote = await post ( bob , { text : 'hi' , replyId : aliceNote . id } ) ;
896
897
897
898
await waitForPushToTl ( ) ;
898
899
899
- const res = await api ( 'notes/user-list-timeline' , { listId : list . id , withReplies : false } , alice ) ;
900
+ const res = await api ( 'notes/user-list-timeline' , { listId : list . id } , alice ) ;
900
901
901
902
assert . strictEqual ( res . body . some ( ( note : any ) => note . id === bobNote . id ) , true ) ;
902
903
} ) ;
903
904
905
+ test . concurrent ( 'withReplies: false でリスインしているフォローしていないユーザーの他人への返信が含まれない' , async ( ) => {
906
+ const [ alice , bob , carol ] = await Promise . all ( [ signup ( ) , signup ( ) , signup ( ) ] ) ;
907
+
908
+ const list = await api ( 'users/lists/create' , { name : 'list' } , alice ) . then ( res => res . body ) ;
909
+ await api ( 'users/lists/push' , { listId : list . id , userId : bob . id } , alice ) ;
910
+ await api ( 'users/lists/update-membership' , { listId : list . id , userId : bob . id , withReplies : false } , alice ) ;
911
+ await sleep ( 1000 ) ;
912
+ const carolNote = await post ( carol , { text : 'hi' } ) ;
913
+ const bobNote = await post ( bob , { text : 'hi' , replyId : carolNote . id } ) ;
914
+
915
+ await waitForPushToTl ( ) ;
916
+
917
+ const res = await api ( 'notes/user-list-timeline' , { listId : list . id } , alice ) ;
918
+
919
+ assert . strictEqual ( res . body . some ( ( note : any ) => note . id === bobNote . id ) , false ) ;
920
+ } ) ;
921
+
904
922
test . concurrent ( 'withReplies: true でリスインしているフォローしていないユーザーの他人への返信が含まれる' , async ( ) => {
905
923
const [ alice , bob , carol ] = await Promise . all ( [ signup ( ) , signup ( ) , signup ( ) ] ) ;
906
924
0 commit comments