// Attach embedded pictures to the body
if ($data->photo) {
- foreach ($data->photo AS $photo)
+ foreach ($data->photo AS $photo) {
$body = "[img]".unxmlify($photo->remote_photo_path).
unxmlify($photo->remote_photo_name)."[/img]\n".$body;
+ }
- $datarray["object-type"] = ACTIVITY_OBJ_PHOTO;
+ $datarray["object-type"] = ACTIVITY_OBJ_IMAGE;
} else {
$datarray["object-type"] = ACTIVITY_OBJ_NOTE;
intval($uid)
);
- if(count($r)) {
- if(($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
- require_once('include/salmon.php');
- slapper($r[0],$contact['notify'],$slap);
+ if (dbm::is_result($r)) {
+ if (($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
+
+ // create a follow slap
+ $item = array();
+ $item['verb'] = ACTIVITY_FOLLOW;
+ $item['follow'] = $contact["url"];
+ $slap = ostatus::salmon($item, $r[0]);
+ slapper($r[0], $contact['notify'], $slap);
}
++<<<<<<< HEAD
+ if($contact['network'] == NETWORK_DIASPORA) {
+ require_once('include/diaspora.php');
+ $ret = Diaspora::send_share($a->user,$contact);
++=======
+ if ($contact['network'] == NETWORK_DIASPORA) {
+ $ret = diaspora::send_share($a->user,$contact);
++>>>>>>> friendica/develop
logger('share returns: '.$ret);
}
}