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
|
@ -1078,6 +1078,7 @@ function statusnet_createpost($a, $uid, $post, $self, $create_user, $only_existi
|
|||
if (count($r)) {
|
||||
$postarray['thr-parent'] = $r[0]["uri"];
|
||||
$postarray['parent-uri'] = $r[0]["parent-uri"];
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_COMMENT;
|
||||
} else {
|
||||
$r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($parent),
|
||||
|
@ -1086,9 +1087,11 @@ function statusnet_createpost($a, $uid, $post, $self, $create_user, $only_existi
|
|||
if (count($r)) {
|
||||
$postarray['thr-parent'] = $r[0]['uri'];
|
||||
$postarray['parent-uri'] = $r[0]['parent-uri'];
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_COMMENT;
|
||||
} else {
|
||||
$postarray['thr-parent'] = $postarray['uri'];
|
||||
$postarray['parent-uri'] = $postarray['uri'];
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_NOTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1110,8 +1113,10 @@ function statusnet_createpost($a, $uid, $post, $self, $create_user, $only_existi
|
|||
}
|
||||
// Don't create accounts of people who just comment something
|
||||
$create_user = false;
|
||||
} else
|
||||
} else {
|
||||
$postarray['parent-uri'] = $postarray['uri'];
|
||||
$postarray['object-type'] = ACTIVITY_OBJ_NOTE;
|
||||
}
|
||||
|
||||
if ($contactid == 0) {
|
||||
$contactid = statusnet_fetch_contact($uid, $post->user, $create_user);
|
||||
|
@ -1127,6 +1132,7 @@ function statusnet_createpost($a, $uid, $post, $self, $create_user, $only_existi
|
|||
$postarray['contact-id'] = $contactid;
|
||||
|
||||
$postarray['verb'] = ACTIVITY_POST;
|
||||
|
||||
$postarray['author-name'] = $postarray['owner-name'];
|
||||
$postarray['author-link'] = $postarray['owner-link'];
|
||||
$postarray['author-avatar'] = $postarray['owner-avatar'];
|
||||
|
@ -1231,7 +1237,8 @@ function statusnet_checknotification($a, $uid, $own_url, $top_item, $postarray)
|
|||
'to_email' => $user[0]['email'],
|
||||
'uid' => $user[0]['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $top_item,
|
||||
//'link' => $a->get_baseurl() . '/display/' . $user[0]['nickname'] . '/' . $top_item,
|
||||
'link' => $a->get_baseurl().'/display/'.get_item_guid($top_item),
|
||||
'source_name' => $postarray['author-name'],
|
||||
'source_link' => $postarray['author-link'],
|
||||
'source_photo' => $postarray['author-avatar'],
|
||||
|
@ -1412,7 +1419,8 @@ function statusnet_fetchhometimeline($a, $uid) {
|
|||
'to_email' => $u[0]['email'],
|
||||
'uid' => $u[0]['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item,
|
||||
//'link' => $a->get_baseurl() . '/display/' . $u[0]['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'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue