From eef955abf3f2a1f59579491b59021b407a1f70dd Mon Sep 17 00:00:00 2001 From: Kay Marquardt Date: Thu, 14 May 2020 12:10:37 +0200 Subject: [PATCH] is_botadmin compatibility when changed from is_admin if is_admin is changed to is_botadmin and vice versa, the first argument stays with chatid ... --- modules/chatMember.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/chatMember.sh b/modules/chatMember.sh index 3a176a3..4afa196 100644 --- a/modules/chatMember.sh +++ b/modules/chatMember.sh @@ -48,6 +48,7 @@ user_is_admin() { user_is_botadmin() { local admin; admin="$(head -n 1 "${BOTADMIN}")" [ "${admin}" = "${1}" ] && return 0 + [ "${admin}" = "${2}" ] && return 0 [[ "${admin}" = "@*" ]] && [[ "${admin}" = "${2}" ]] && return 0 if [ "${admin}" = "?" ]; then printf '%s\n' "${1:-?}" >"${BOTADMIN}"; return 0; fi return 1