1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

everywhere: improve anonymous comments logic

This commit is contained in:
Adhityaa Chandrasekar
2019-01-23 00:26:22 -05:00
parent 61bc73e705
commit 022fc06257
10 changed files with 52 additions and 35 deletions

View File

@ -91,6 +91,8 @@
resp.domains[i].viewsLast30Days = global.numberify(0);
resp.domains[i].commentsLast30Days = global.numberify(0);
resp.domains[i].allowAnonymous = !resp.domains[i].requireIdentification;
for (var j = 0; j < resp.domains[i].moderators.length; j++) {
resp.domains[i].moderators[j].timeAgo = global.timeSince(
@ -109,6 +111,7 @@
// Updates a domain with the backend.
global.domainUpdate = function(domain, callback) {
domain.requireIdentification = !domain.allowAnonymous;
var json = {
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": domain,