Skip to content
Snippets Groups Projects
Commit 03bb6dff authored by echicken's avatar echicken :chicken:
Browse files

Proper comparison of POLL_RESULTS stuff in header.auxattr

parent cbe7aea4
No related branches found
No related tags found
No related merge requests found
...@@ -201,13 +201,14 @@ function getUserPollData(sub, id) { ...@@ -201,13 +201,14 @@ function getUserPollData(sub, id) {
msgBase.cfg.settings&SUB_NAME ? user.name : user.alias msgBase.cfg.settings&SUB_NAME ? user.name : user.alias
); );
msgBase.close(); msgBase.close();
var pollAttr = header.auxattr&POLL_RESULTS_MASK;
if (header.from === user.alias || header.from === user.name) { if (header.from === user.alias || header.from === user.name) {
ret.show_results = true; ret.show_results = true;
} else if (header.auxattr&POLL_RESULTS_CLOSED && header.auxattr&POLL_CLOSED) { } else if (pollAttr === POLL_RESULTS_CLOSED && header.auxattr&POLL_CLOSED) {
ret.show_results = true; ret.show_results = true;
} else if (header.auxattr&POLL_RESULTS_OPEN) { } else if (pollAttr === POLL_RESULTS_OPEN) {
ret.show_results = true; ret.show_results = true;
} else if (header.auxattr&POLL_RESULTS_VOTERS && ret.answers > 0) { } else if (pollAttr === POLL_RESULTS_VOTERS && ret.answers > 0) {
ret.show_results = true; ret.show_results = true;
} }
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment