mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 02:18:48 +00:00
New user based item function
This commit is contained in:
parent
ef0a2f6f8d
commit
c66dcf96ac
5 changed files with 7 additions and 7 deletions
|
@ -454,7 +454,7 @@ function twitter_post_hook(App $a, &$b)
|
|||
}
|
||||
|
||||
$condition = ['uri' => $b["thr-parent"], 'uid' => $b["uid"]];
|
||||
$orig_post = Item::selectFirst($b["uid"], [], $condition);
|
||||
$orig_post = Item::selectFirst([], $condition);
|
||||
if (!DBM::is_result($orig_post)) {
|
||||
logger("twitter_post_hook: no parent found " . $b["thr-parent"]);
|
||||
return;
|
||||
|
@ -758,7 +758,7 @@ function twitter_prepare_body(App $a, &$b)
|
|||
$item["plink"] = $a->get_baseurl() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
|
||||
|
||||
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
|
||||
$orig_post = Item::selectFirst(local_user(), ['author-link'], $condition);
|
||||
$orig_post = Item::selectFirst(['author-link'], $condition);
|
||||
if (DBM::is_result($orig_post)) {
|
||||
$nicknameplain = preg_replace("=https?://twitter.com/(.*)=ism", "$1", $orig_post["author-link"]);
|
||||
$nickname = "@[url=" . $orig_post["author-link"] . "]" . $nicknameplain . "[/url]";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue