Merge pull request #1969 from stackernews/fix-saloon-replies
Fix saloon replies
This commit is contained in:
commit
dbce0a7517
@ -27,8 +27,8 @@ export async function getBaseCost ({ models, bio, parentId, subName }) {
|
|||||||
LEFT JOIN "Sub" s ON s.name = COALESCE(r."subName", i."subName")
|
LEFT JOIN "Sub" s ON s.name = COALESCE(r."subName", i."subName")
|
||||||
WHERE i.id = ${Number(parentId)}`
|
WHERE i.id = ${Number(parentId)}`
|
||||||
|
|
||||||
if (!sub) return DEFAULT_ITEM_COST
|
if (sub?.replyCost) return satsToMsats(sub.replyCost)
|
||||||
return satsToMsats(sub.replyCost)
|
return DEFAULT_ITEM_COST
|
||||||
}
|
}
|
||||||
|
|
||||||
const sub = await models.sub.findUnique({ where: { name: subName } })
|
const sub = await models.sub.findUnique({ where: { name: subName } })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user