mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
refactor: add zap tag with new data structure
This commit is contained in:
parent
c49460e37d
commit
0e43d1e8a7
1 changed files with 2 additions and 2 deletions
|
|
@ -183,8 +183,8 @@ const createStatusController: AppController = async (c) => {
|
||||||
if (lnurl && zap_split) {
|
if (lnurl && zap_split) {
|
||||||
let totalSplit = 0;
|
let totalSplit = 0;
|
||||||
for (const pubkey in zap_split) {
|
for (const pubkey in zap_split) {
|
||||||
totalSplit += Number(zap_split[pubkey][0]);
|
totalSplit += zap_split[pubkey].amount;
|
||||||
tags.push(['zap', pubkey, Conf.relay, zap_split[pubkey][0]]);
|
tags.push(['zap', pubkey, Conf.relay, zap_split[pubkey].amount.toString()]);
|
||||||
}
|
}
|
||||||
if (totalSplit) {
|
if (totalSplit) {
|
||||||
tags.push(['zap', author?.pubkey as string, Conf.relay, Math.max(0, 100 - totalSplit).toString()]);
|
tags.push(['zap', author?.pubkey as string, Conf.relay, Math.max(0, 100 - totalSplit).toString()]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue