From 8d4f3e3564509367ed8ca6afdd148dff6de17fd7 Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Mon, 11 Dec 2023 17:29:34 +0800 Subject: [PATCH] debug --- scripts/install/test.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/scripts/install/test.sh b/scripts/install/test.sh index ccd3fe2c1..2742152a8 100755 --- a/scripts/install/test.sh +++ b/scripts/install/test.sh @@ -529,27 +529,36 @@ EOF openim::test::check_error "$response" } -# Updates the pin status of a friend. +# Updates the pin status of multiple friends. openim::test::update_pin_status() { local ownerUserID="${1}" - local friendUserID="${2}" - local isPinned="${3}" + shift # Shift the arguments to skip the first one (ownerUserID) + local isPinned="${1}" + shift # Shift the arguments to skip the isPinned argument + + # Constructing the list of friendUserIDs + local friendUserIDsArray=() + for friendUserID in "$@"; do + friendUserIDsArray+=("\"${friendUserID}\"") + done + local friendUserIDs=$(IFS=,; echo "${friendUserIDsArray[*]}") local request_body=$(cat <