This commit is contained in:
Mystikfluu 2022-08-10 23:48:55 +02:00
parent f8c2d508e4
commit 3147af35ec

View File

@ -16,8 +16,8 @@ module.exports = {
"dms_user_name","dms_text","dms_time","dms_special_text","dms_id","dms_from_bot","dms_reply_id" "dms_user_name","dms_text","dms_time","dms_special_text","dms_id","dms_from_bot","dms_reply_id"
] ]
let sql = `select ${columns.join(",")} from ipost.dms where (dms_receiver = ?) order by dms_id desc;` let sql = `select ${columns.join(",")} from ipost.dms where (dms_receiver = ? or dms_receiver = ?) order by dms_id desc;`
con.query(sql, [otherperson], function (err, result) { con.query(sql, [otherperson,encodeURIComponent(res.locals.username)], function (err, result) {
if (err) throw err; if (err) throw err;
res.json(result) res.json(result)
}); });