This commit is contained in:
payacom
2026-09-24 21:03:27 +03:30
parent 7f0ddfde70
commit 806471241e
43 changed files with 2166 additions and 144 deletions

View File

@@ -389,7 +389,13 @@ const sendPostToUsers = async (req, res, next) => {
if (io) {
const formatted = await enrichMessage(newMessage)
emitChatEvents(io, formatted, senderId, receiverId)
// برخلافِ پیامِ متنیِ معمولی، این پیام رو خودِ سرور از رویِ دیتای واقعیِ پست ساخته
// (نه متنِ رمزنگاری‌شدهٔ کاربر)، پس اینجا محدودیتِ E2EE برای پوش صدق نمی‌کنه —
// می‌تونیم دقیقاً بگیم ریلز بوده یا پست
emitChatEvents(io, formatted, senderId, receiverId, {
type: post.type === 'video' ? 'reel_shared' : 'post_shared',
description: post.type === 'video' ? 'یک ریلز برای شما ارسال کرد' : 'یک پست برای شما ارسال کرد'
})
}
sentCount += 1
}