update: added recipient pubkey

This commit is contained in:
Oluwatobi Bamidele 2024-02-02 23:10:23 +01:00
parent fbe3d5b294
commit 25c31b12a5
3 changed files with 5 additions and 2 deletions

View file

@ -134,7 +134,7 @@ function processAction(req, res) {
return (0, res_1.failure)(res, 'failed to parse webhook body json');
}
}
const { action, bot_id, bot_secret, pubkey, amount, content, chat_uuid, msg_uuid, reply_uuid, recipient_id, parent_id, only_pubkey, only_owner, } = body;
const { action, bot_id, bot_secret, pubkey, amount, content, chat_uuid, msg_uuid, reply_uuid, recipient_id, parent_id, only_pubkey, only_owner, recipient_pubkey, } = body;
if (!bot_id)
return (0, res_1.failure)(res, 'no bot_id');
const bot = (yield models_1.models.Bot.findOne({ where: { id: bot_id } }));
@ -169,6 +169,7 @@ function processAction(req, res) {
recipient_id: recipient_id ? parseInt(recipient_id) : 0,
only_pubkey: only_pubkey || '',
only_owner: only_owner || false,
recipient_pubkey: recipient_pubkey || '',
};
try {
const r = yield finalAction(a);

File diff suppressed because one or more lines are too long

View file

@ -175,6 +175,7 @@ export async function processAction(req: Req, res: Res): Promise<void> {
parent_id,
only_pubkey,
only_owner,
recipient_pubkey,
} = body
if (!bot_id) return failure(res, 'no bot_id')
@ -210,6 +211,7 @@ export async function processAction(req: Req, res: Res): Promise<void> {
recipient_id: recipient_id ? parseInt(recipient_id) : 0,
only_pubkey: only_pubkey || '',
only_owner: only_owner || false,
recipient_pubkey: recipient_pubkey || '',
}
try {