Fixed cloud function for setting friends

includeKey is still an issue!