fix buggy notify_admin

This commit is contained in:
Daniel Hansson 2020-04-24 04:18:02 +02:00 committed by GitHub
parent c56eae18ae
commit 4bc2dcdefe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
lib.sh
View File

@ -1183,7 +1183,7 @@ fi
print_text_in_color "$ICyan" "Posting notification to users that are admins, this might take a while..."
occ_command_no_check user:list | sed 's|^ - ||g' | sed 's|:.*||' | while read -r admin
do
if occ_command_no_check user:info "$admin" | grep -xq " \- admin"
if occ_command_no_check user:info "$admin" | cut -d "-" -f2 | grep -q " admin"
then
print_text_in_color "$IGreen" "Posting '$1' to: $admin"
occ_command_no_check notification:generate -l "$2" "$admin" "$1"