Guests now trigger topic notifications, and the translator has
been updated so that translations inside translations are
handled in a way that doesn't cause the translator to explode.
v1.18.x
Julian Lam 9 years ago
parent 1660e13aed
commit fcb381f922

@ -9,7 +9,7 @@
var languages = {},
regexes = {
match: /\[\[\w+:.*?\]\]/g,
match: /\[\[\w+:[^\[]*?\]\]/g,
split: /[,][\s]*/,
replace: /\]+$/
};
@ -153,7 +153,12 @@
translateKey(key, data, language, function(translated) {
--count;
if (count <= 0) {
callback(translated.text);
keys = translated.text.match(regexes.match);
if (!keys) {
callback(translated.text);
} else {
translateKeys(keys, translated.text, language, callback);
}
}
});
});

@ -252,10 +252,10 @@ module.exports = function(Topics) {
}
if (parseInt(uid, 10)) {
Topics.notifyFollowers(postData, uid);
user.setUserField(uid, 'lastonline', Date.now());
}
Topics.notifyFollowers(postData, uid);
plugins.fireHook('action:topic.reply', postData);
next(null, postData);

Loading…
Cancel
Save