fix realtime updates in 'following' replies filter #285

Merged
floatingghost merged 1 commit from flisk/akkoma-fe:fix-realtime-reply-filter into develop 2023-03-10 18:56:32 +00:00

View file

@ -5,15 +5,25 @@ import { map } from 'lodash'
const retryTimeout = (multiplier) => 1000 * multiplier const retryTimeout = (multiplier) => 1000 * multiplier
const isVisible = (store, message, visibility) => { const isVisible = (store, message, visibility) => {
if (visibility === 'all') { if (visibility == 'all') {
return true return true
} else if (visibility === 'following') { }
if (visibility == 'following') {
if (message.in_reply_to_user_id === null) {
return true
} else {
return store.getters.relationship(message.in_reply_to_user_id).following return store.getters.relationship(message.in_reply_to_user_id).following
} else if (visibility === 'self') { }
}
if (visibility == 'self') {
return message.in_reply_to_user_id === store.rootState.users.currentUser.id return message.in_reply_to_user_id === store.rootState.users.currentUser.id
} }
return false return false
} }
const api = { const api = {
state: { state: {
retryMultiplier: 1, retryMultiplier: 1,