Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/instagram/src/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const {handleMessage} = require("./handlers/handleMessage");
const {handlePostback} = require("./handlers/handlePostback");
// const attachmentHandler = require("./handlers/attachment");
// const postbackHandler = require("./handlers/postback");
// const quickReplyHandler = require("./handlers/quickreply");
// const storyHandler = require("./handlers/story");
// const referralHandler = require("./handlers/referral");
const echoHandler = require("./handlers/echo");
module.exports = async (event) => {
// console.log(event);
// Echo messages (sent by page itself)
// if (event.message?.is_echo) {
// return echoHandler(event);
// }
// if (event.message?.is_echo === true) {
// return; // silently ignore
// }
const senderId = event.sender?.id;
const recipientId = event.recipient?.id;
// ✅ HARD STOP: Ignore all self / echo / system messages
if (!senderId || !recipientId || senderId === recipientId) {
return;
}
if (event.message?.is_echo) {
return;
}
// // Postback (buttons, persistent menu)
if (event.postback) {
return handlePostback(event);
}
// // Quick reply
// if (event.message?.quick_reply) {
// return quickReplyHandler(event);
// }
// // Attachments (image, video, audio, file)
// if (event.message?.attachments) {
// return attachmentHandler(event);
// }
// // Story reply
// if (event.message?.story) {
// return storyHandler(event);
// }
// // Referral (ads, profile, links)
// if (event.referral) {
// return referralHandler(event);
// }
// Text message
if (event.message?.text) {
return handleMessage(event);
}
// console.log("Unhandled event:", JSON.stringify(event, null, 2));
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |