This commit is contained in:
payacom
2026-09-24 21:00:07 +03:30
parent 1954b2661d
commit 7f0ddfde70
113 changed files with 570 additions and 5049 deletions

View File

@@ -7,7 +7,7 @@ const OFFER_REPLY_WINDOW_MS = 12 * 60 * 60 * 1000
/**
* Called whenever a chat message is sent. If there's a pending paid Offer
* between these two users, tracks the requester's first direct message and
* the receiver's reply — the receiver's 30% commission is only credited if
* the receiver's reply — the receiver's 50% commission is only credited if
* they reply within 12 hours of that first message.
*/
async function trackOfferMessageForCommission (io, senderId, receiverId) {
@@ -49,7 +49,7 @@ async function trackOfferMessageForCommission (io, senderId, receiverId) {
amount: offer.pendingCommissionAmount,
referenceType: 'payment',
referenceId: offer._id,
description: 'سهم دریافتی از درخواست همکاری (۳۰٪، پس از پاسخ به‌موقع)'
description: 'سهم دریافتی از درخواست همکاری (۵۰٪، پس از پاسخ به‌موقع)'
})
if (io) {
@@ -57,7 +57,7 @@ async function trackOfferMessageForCommission (io, senderId, receiverId) {
io.to(`user:${String(offer.receiver)}`).emit('notification', {
type: 'offer_commission',
title: 'واریز سهم درخواست همکاری',
description: 'با پاسخ به‌موقع، ۳۰٪ مبلغ درخواست همکاری به کیف پول شما واریز شد.'
description: 'با پاسخ به‌موقع، ۵۰٪ مبلغ درخواست همکاری به کیف پول شما واریز شد.'
})
} catch (_) {}
}