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 <