don't ever reveal user wallet balances to other users
This commit is contained in:
parent
468c054d45
commit
01ee9cdd1c
|
@ -150,7 +150,10 @@ export default {
|
||||||
AND "Item"."userId" = ${user.id}`
|
AND "Item"."userId" = ${user.id}`
|
||||||
return sum || 0
|
return sum || 0
|
||||||
},
|
},
|
||||||
sats: async (user, args, { models }) => {
|
sats: async (user, args, { models, me }) => {
|
||||||
|
if (me?.id !== user.id) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
return Math.floor(user.msats / 1000)
|
return Math.floor(user.msats / 1000)
|
||||||
},
|
},
|
||||||
bio: async (user, args, { models }) => {
|
bio: async (user, args, { models }) => {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default function Seo ({ item, user }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (user) {
|
if (user) {
|
||||||
desc = `@${user.name} has [${user.stacked} stacked, ${user.sats} sats, ${user.nitems} posts, ${user.ncomments} comments]`
|
desc = `@${user.name} has [${user.stacked} stacked, ${user.nitems} posts, ${user.ncomments} comments]`
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue