Don't put statuses we received from retweets into timelines.

They should be in allStatuses to keep only one reference, but they
should not get into the timeline, or it will mess up old status
fetching, because they have a very low id.
This commit is contained in:
Roger Braun 2016-11-07 22:09:34 +01:00
parent 79b2243f6c
commit f8a3afc9d1
2 changed files with 17 additions and 16 deletions

View file

@ -42,9 +42,10 @@ describe('The Statuses module', () => {
retweet.retweeted_status = status
// It adds both statuses
mutations.addNewStatuses(state, { statuses: [retweet], timeline: 'public' })
expect(state.allStatuses).to.eql([retweet, status])
// It adds both statuses, but only the retweet to visible.
mutations.addNewStatuses(state, { statuses: [retweet], timeline: 'public', showImmediately: true })
expect(state.timelines.public.visibleStatuses).to.have.length(1)
expect(state.allStatuses).to.eql([status, retweet])
// It refers to the modified status.
mutations.addNewStatuses(state, { statuses: [modStatus], timeline: 'public' })