mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
appnet, fbsync, pumpio, statusnet, twitter: Setting the object-type according to the posting
Bugfix for replies from pumpio to pictures.
This commit is contained in:
parent
418ce62d7b
commit
c95f70d449
5 changed files with 89 additions and 30 deletions
|
@ -716,7 +716,8 @@ function appnet_fetchstream($a, $uid) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item,
|
||||
//'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item,
|
||||
'link' => $a->get_baseurl().'/display/'.get_item_guid($item),
|
||||
'source_name' => $postarray['author-name'],
|
||||
'source_link' => $postarray['author-link'],
|
||||
'source_photo' => $postarray['author-avatar'],
|
||||
|
@ -770,7 +771,8 @@ function appnet_fetchstream($a, $uid) {
|
|||
'to_email' => $user['email'],
|
||||
'uid' => $user['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item,
|
||||
//'link' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item,
|
||||
'link' => $a->get_baseurl().'/display/'.get_item_guid($item),
|
||||
'source_name' => $postarray['author-name'],
|
||||
'source_link' => $postarray['author-link'],
|
||||
'source_photo' => $postarray['author-avatar'],
|
||||
|
@ -867,8 +869,12 @@ function appnet_createpost($a, $uid, $post, $me, $user, $ownid, $createuser, $th
|
|||
}
|
||||
// Don't create accounts of people who just comment something
|
||||
$createuser = false;
|
||||
} else
|
||||
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_COMMENT;
|
||||
} else {
|
||||
$postarray['thr-parent'] = $postarray['uri'];
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_NOTE;
|
||||
}
|
||||
|
||||
$postarray['plink'] = $post["canonical_url"];
|
||||
|
||||
|
@ -953,6 +959,10 @@ function appnet_createpost($a, $uid, $post, $me, $user, $ownid, $createuser, $th
|
|||
$page_info = "\n[url=".$photo["url"]."][img]".$photo["large"]."[/img][/url]";
|
||||
elseif ($photo["url"] != "")
|
||||
$page_info = "\n[img]".$photo["url"]."[/img]";
|
||||
|
||||
if ($photo["url"] != "")
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_IMAGE;
|
||||
|
||||
} else
|
||||
$photo = array("url" => "", "large" => "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue