Improved similarity to ostatus group feeds
This commit is contained in:
parent
3ff6520ed5
commit
d8824cc3bc
|
@ -2023,12 +2023,10 @@ class OStatus
|
||||||
$mentioned = $newmentions;
|
$mentioned = $newmentions;
|
||||||
|
|
||||||
foreach ($mentioned as $mention) {
|
foreach ($mentioned as $mention) {
|
||||||
$r = q(
|
$condition = ['uid' => $owner['uid'], 'nurl' => normalise_link($mention)];
|
||||||
"SELECT `forum`, `prv` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s'",
|
$contact = dba::selectFirst('contact', ['forum', 'prv', 'self', 'contact-type'], $condition);
|
||||||
intval($owner["uid"]),
|
if ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == ACCOUNT_TYPE_COMMUNITY) ||
|
||||||
dbesc(normalise_link($mention))
|
($contact['self'] && ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY))) {
|
||||||
);
|
|
||||||
if ($r[0]["forum"] || $r[0]["prv"]) {
|
|
||||||
XML::addElement($doc, $entry, "link", "",
|
XML::addElement($doc, $entry, "link", "",
|
||||||
[
|
[
|
||||||
"rel" => "mentioned",
|
"rel" => "mentioned",
|
||||||
|
@ -2045,6 +2043,12 @@ class OStatus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY) {
|
||||||
|
XML::addElement($doc, $entry, "link", "", ["rel" => "mentioned",
|
||||||
|
"ostatus:object-type" => "http://activitystrea.ms/schema/1.0/group",
|
||||||
|
"href" => $owner['url']]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$item["private"]) {
|
if (!$item["private"]) {
|
||||||
XML::addElement($doc, $entry, "link", "", ["rel" => "ostatus:attention",
|
XML::addElement($doc, $entry, "link", "", ["rel" => "ostatus:attention",
|
||||||
"href" => "http://activityschema.org/collection/public"]);
|
"href" => "http://activityschema.org/collection/public"]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user