mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 16:37:52 +00:00
fix wrong checks of twist data userpost.msg property that leads to applying of language filtering by userpost.rt.msg
This commit is contained in:
parent
ac98d8175a
commit
a9c8f71ab0
@ -445,7 +445,7 @@ function processQuery(req) {
|
||||
continue;
|
||||
|
||||
if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangForSearching.val) {
|
||||
if (userpost.msg !== '')
|
||||
if (typeof userpost.msg === 'string' && userpost.msg !== '')
|
||||
langFilterData = filterLang(userpost.msg);
|
||||
else
|
||||
langFilterData = filterLang(userpost.rt.msg);
|
||||
|
@ -360,7 +360,7 @@ function willBeHidden(post) {
|
||||
if (typeof post.userpost.lastk === 'undefined')
|
||||
return false;
|
||||
|
||||
if (post.userpost.rt && typeof post.userpost.rt.msg === 'string' && post.userpost.rt.msg !== '') {
|
||||
if (typeof post.userpost.msg !== 'string' || post.userpost.msg === '') {
|
||||
// hope it is not too egocentric to overcome hideCloseRtsHour this way
|
||||
if (post.userpost.rt.n === defaultScreenName)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user