- if (!x($arr, "gcontact-id")) {
- /*
- * The gcontact should mostly behave like the contact. But is is supposed to be global for the system.
- * This means that wall posts, repeated posts, etc. should have the gcontact id of the owner.
- * On comments the author is the better choice.
- */
- if ($arr['parent-uri'] === $arr['uri']) {
- $arr["gcontact-id"] = GContact::getId(["url" => $arr['owner-link'], "network" => $arr['network'],
- "photo" => $arr['owner-avatar'], "name" => $arr['owner-name']]);
- } else {
- $arr["gcontact-id"] = GContact::getId(["url" => $arr['author-link'], "network" => $arr['network'],
- "photo" => $arr['author-avatar'], "name" => $arr['author-name']]);
- }
- }
-