Compare commits

...

2 commits

Author SHA1 Message Date
Shpuld Shpuldson
32b1ae15d2 fix conflicts 2020-06-05 12:06:42 +03:00
Shpuld Shpuldson
668a84f327 Change move namespacing, fix some emoji reactions related problems not noticed before 2020-02-20 15:57:29 +02:00
8 changed files with 16 additions and 9 deletions

View file

@ -4,7 +4,8 @@ const tabModeDict = {
mentions: ['mention'],
'likes+repeats': ['repeat', 'like'],
follows: ['follow'],
moves: ['move']
moves: ['pleroma:move'],
emoji_reactions: ['pleroma:emoji_reaction']
}
const Interactions = {

View file

@ -26,6 +26,10 @@
key="moves"
:label="$t('interactions.moves')"
/>
<span
key="emoji_reactions"
:label="$t('interactions.emoji_reactions')"
/>
</tab-switcher>
<Notifications
ref="notifications"

View file

@ -78,7 +78,7 @@
<i class="fa icon-user lit" />
<small>{{ $t('notifications.follow_request') }}</small>
</span>
<span v-if="notification.type === 'move'">
<span v-if="notification.type === 'pleroma:move'">
<i class="fa icon-arrow-curved lit" />
<small>{{ $t('notifications.migrated_to') }}</small>
</span>
@ -149,7 +149,7 @@
</div>
</div>
<div
v-else-if="notification.type === 'move'"
v-else-if="notification.type === 'pleroma:move'"
class="move-text"
>
<router-link :to="targetUserProfileLink">

View file

@ -162,6 +162,7 @@
"favs_repeats": "Repeats and Favorites",
"follows": "New follows",
"moves": "User migrates",
"emoji_reactions": "Reactions",
"load_older": "Load older interactions"
},
"post_status": {

View file

@ -82,8 +82,8 @@ const visibleNotificationTypes = (rootState) => {
rootState.config.notificationVisibility.mentions && 'mention',
rootState.config.notificationVisibility.repeats && 'repeat',
rootState.config.notificationVisibility.follows && 'follow',
rootState.config.notificationVisibility.moves && 'move',
rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reactions'
rootState.config.notificationVisibility.moves && 'pleroma:move',
rootState.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction'
].filter(_ => _)
}
@ -359,7 +359,7 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot
case 'follow':
i18nString = 'followed_you'
break
case 'move':
case 'pleroma:move':
i18nString = 'migrated_to'
break
case 'follow_request':

View file

@ -343,7 +343,7 @@ export const parseNotification = (data) => {
output.seen = data.pleroma.is_seen
output.status = isStatusNotification(output.type) ? parseStatus(data.status) : null
output.action = output.status // TODO: Refactor, this is unneeded
output.target = output.type !== 'move'
output.target = output.type !== 'pleroma:move'
? null
: parseUser(data.target)
output.from_profile = parseUser(data.account)

View file

@ -8,7 +8,7 @@ export const visibleTypes = store => ([
store.state.config.notificationVisibility.repeats && 'repeat',
store.state.config.notificationVisibility.follows && 'follow',
store.state.config.notificationVisibility.followRequest && 'follow_request',
store.state.config.notificationVisibility.moves && 'move',
store.state.config.notificationVisibility.moves && 'pleroma:move',
store.state.config.notificationVisibility.emojiReactions && 'pleroma:emoji_reaction'
].filter(_ => _))

View file

@ -66,7 +66,8 @@ function sendSubscriptionToBackEnd (subscription, token, notificationVisibility)
favourite: notificationVisibility.likes,
mention: notificationVisibility.mentions,
reblog: notificationVisibility.repeats,
move: notificationVisibility.moves
'pleroma:move': notificationVisibility.moves,
'pleroma:emoji_reaction': notificationVisibility.emoji_reactions
}
}
})