Skip to content

Commit

Permalink
variable rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Catrya committed Oct 28, 2024
1 parent 4567844 commit fab08ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bot/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ const saveUserReview = async (targetUser, rating) => {
const cancelAddInvoice = async (ctx, order, job) => {
try {
let userAction = false;
let userTelId = false;
let userTgId = false;
if (!job) {
ctx.deleteMessage();
ctx.scene.leave();
userAction = true;
userTelId = ctx.from.id;
userTgId = ctx.from.id;
if (!order) {
const orderId = !!ctx && ctx.update.callback_query.message.text;
if (!orderId) return;
Expand Down Expand Up @@ -274,7 +274,7 @@ const cancelAddInvoice = async (ctx, order, job) => {
order,
i18nCtxSeller
);
} else if (order.creator_id === order.seller_id && userTelId == sellerTgId) {
} else if (order.creator_id === order.seller_id && userTgId == sellerTgId) {
order.status = 'CLOSED';
await order.save();
await messages.successCancelOrderMessage(
Expand Down Expand Up @@ -415,12 +415,12 @@ const showHoldInvoice = async (ctx, bot, order) => {
const cancelShowHoldInvoice = async (ctx, order, job) => {
try {
let userAction = false;
let userTelId = false;
let userTgId = false;
if (!job) {
ctx.deleteMessage();
ctx.scene.leave();
userAction = true;
userTelId = ctx.from.id;
userTgId = ctx.from.id;
if (!order) {
const orderId = !!ctx && ctx.update.callback_query.message.text;
if (!orderId) return;
Expand Down Expand Up @@ -453,7 +453,7 @@ const cancelShowHoldInvoice = async (ctx, order, job) => {
order,
i18nCtx
);
} else if (order.creator_id === order.buyer_id && userTelId == buyerTgId) {
} else if (order.creator_id === order.buyer_id && userTgId == buyerTgId) {
order.status = 'CLOSED';
await order.save();
await messages.successCancelOrderMessage(
Expand Down

0 comments on commit fab08ea

Please sign in to comment.