Skip to content

Commit bfc9218

Browse files
authored
verify admin - always display output (#492)
1 parent acbea0c commit bfc9218

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Parsers/Admin tool - Verify.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,21 @@ if (current.channel == 'GD51HTR46' || current.channel == 'G9LAJG7G8' || current.
5050
verificationStatus = false;
5151
}
5252

53-
else if(verificationStatus != null){
53+
else if(verificationStatus == null){
5454
verificationStatus = true;
5555
}
5656

5757
description = paramArr.join(' ');
5858
var grUser = new GlideRecord('x_snc_slackerbot_user');
5959
if(grUser.get('user_id',userId)){
60-
verificationStatus != null ? grUser.setValue('verified',verificationStatus) : null;
60+
verificationStatus != null ? grUser.setValue('verified',verificationStatus) : grUser.getValue('verified');
6161
description.length > 0 ? grUser.setValue('user_info',description) : null;
6262
grUser.update();
6363

6464
messageBody = 'Updated <@' + userId + '>\'s verification information with the following info:\n';
65-
if(verificationStatus != null){
66-
messageBody += 'Verification status: ' + (verificationStatus ? 'Verified' : 'Unverified') + '\n';
67-
}
68-
if(description.length > 0){
69-
messageBody += 'User information: ' + description;
70-
}
65+
messageBody += 'Verification status: ' + (verificationStatus ? '*Verified*' : '*Unverified*') + '\n';
66+
messageBody += 'User information:\n>' + description;
67+
7168
} else {
7269
messageBody += 'I\'m afraid I can\'t do that as the ~limit~ user does not exist.';
7370
}

0 commit comments

Comments
 (0)