IFTTT: Set the extid, removed legacy Facebook stuff

This commit is contained in:
Michael Vogel 2020-12-13 19:42:45 +01:00
parent 99e96d8923
commit 6cad529c38

View file

@ -169,12 +169,6 @@ function ifttt_message($uid, $item)
//$post['date'] = $item['date']; //$post['date'] = $item['date'];
//$post['uri'] = $item['url']; //$post['uri'] = $item['url'];
if (!empty($item['url']) && strstr($item['url'], 'facebook.com')) {
$hash = hash('ripemd128', $item['url']);
$post['extid'] = Protocol::FACEBOOK;
$post['message_id'] = Item::newURI($uid, Protocol::FACEBOOK . ':' . $hash);
}
if ($item['type'] == 'link') { if ($item['type'] == 'link') {
$link = $item['link']; $link = $item['link'];
$data = PageInfo::queryUrl($item['link']); $data = PageInfo::queryUrl($item['link']);
@ -197,5 +191,7 @@ function ifttt_message($uid, $item)
$link = hash('ripemd128', $item['msg']); $link = hash('ripemd128', $item['msg']);
} }
$post['extid'] = $link;
Post\Delayed::add($link, $post, PRIORITY_MEDIUM, true); Post\Delayed::add($link, $post, PRIORITY_MEDIUM, true);
} }