Merge remote-tracking branch 'origin/master' into develop

isekai-main
Julian Lam 3 years ago
commit c6782a2173

@ -32,7 +32,11 @@ app.onDomReady = function () {
});
};
document.addEventListener('DOMContentLoaded', ajaxify.parseData);
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', ajaxify.parseData);
} else {
ajaxify.parseData();
}
(function () {
let appLoaded = false;

@ -244,7 +244,7 @@ authenticationController.login = async (req, res, next) => {
}
const loginWith = meta.config.allowLoginWith || 'username-email';
req.body.username = req.body.username.trim();
req.body.username = String(req.body.username).trim();
const errorHandler = res.locals.noScriptErrors || helpers.noScriptErrors;
try {
await plugins.hooks.fire('filter:login.check', { req: req, res: res, userData: req.body });

@ -829,9 +829,10 @@ Flags.notify = async function (flagObj, uid, notifySelf = false) {
});
uids = uids.concat(modUids[0]);
} else if (flagObj.type === 'user') {
const targetDisplayname = flagObj.target && flagObj.target.user ? flagObj.target.user.displayname : '[[global:guest]]';
notifObj = await notifications.create({
type: 'new-user-flag',
bodyShort: `[[notifications:user_flagged_user, ${displayname}, ${flagObj.target.user.displayname}]]`,
bodyShort: `[[notifications:user_flagged_user, ${displayname}, ${targetDisplayname}]]`,
bodyLong: await plugins.hooks.fire('filter:parse.raw', String(flagObj.description || '')),
path: `/flags/${flagObj.flagId}`,
nid: `flag:user:${flagObj.targetId}`,

Loading…
Cancel
Save