Throw out retweets from conversations.
This commit is contained in:
parent
cc00eb898f
commit
b839ad95c5
@ -1,6 +1,12 @@
|
|||||||
import { find, filter, sortBy, toInteger } from 'lodash'
|
import { find, filter, sortBy, toInteger } from 'lodash'
|
||||||
|
import { statusType } from '../../modules/statuses.js'
|
||||||
import Status from '../status/status.vue'
|
import Status from '../status/status.vue'
|
||||||
|
|
||||||
|
const sortAndFilterConversation = (conversation) => {
|
||||||
|
conversation = filter(conversation, (status) => statusType(status) !== 'retweet')
|
||||||
|
return sortBy(conversation, 'id')
|
||||||
|
}
|
||||||
|
|
||||||
const conversation = {
|
const conversation = {
|
||||||
computed: {
|
computed: {
|
||||||
status () {
|
status () {
|
||||||
@ -18,7 +24,8 @@ const conversation = {
|
|||||||
const conversationId = this.status.statusnet_conversation_id
|
const conversationId = this.status.statusnet_conversation_id
|
||||||
const statuses = this.$store.state.statuses.allStatuses
|
const statuses = this.$store.state.statuses.allStatuses
|
||||||
const conversation = filter(statuses, { statusnet_conversation_id: conversationId })
|
const conversation = filter(statuses, { statusnet_conversation_id: conversationId })
|
||||||
return sortBy(conversation, 'id')
|
|
||||||
|
return sortAndFilterConversation(conversation)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
Reference in New Issue
Block a user