use moderator id to identify myself

This commit is contained in:
Moriz Wahl 2023-03-10 14:28:27 +01:00
parent 3d41f1d9f3
commit d9f5c1e89e
2 changed files with 2 additions and 5 deletions

View File

@ -82,7 +82,7 @@ const mocks = {
$store: { $store: {
state: { state: {
moderator: { moderator: {
id: 0, id: 1,
name: 'test moderator', name: 'test moderator',
}, },
}, },

View File

@ -147,10 +147,7 @@ export default {
}, },
methods: { methods: {
myself(item) { myself(item) {
return ( return item.userId === this.$store.state.moderator.id
`${item.firstName} ${item.lastName}` ===
`${this.$store.state.moderator.firstName} ${this.$store.state.moderator.lastName}`
)
}, },
getStatusIcon(status) { getStatusIcon(status) {
return iconMap[status] ? iconMap[status] : 'default-icon' return iconMap[status] ? iconMap[status] : 'default-icon'