Merge pull request #13161 from annando/bluesky-activities
Support for Bluesky reshares in the core
This commit is contained in:
commit
7b02585b97
2 changed files with 6 additions and 2 deletions
|
@ -2050,7 +2050,11 @@ class Item
|
||||||
}
|
}
|
||||||
|
|
||||||
// Glue it together to be able to make a hash from it
|
// Glue it together to be able to make a hash from it
|
||||||
$host_id = implode('/', $parsed);
|
if (!empty($parsed)) {
|
||||||
|
$host_id = implode('/', $parsed);
|
||||||
|
} else {
|
||||||
|
$host_id = $uri;
|
||||||
|
}
|
||||||
|
|
||||||
// Use a mixture of several hashes to provide some GUID like experience
|
// Use a mixture of several hashes to provide some GUID like experience
|
||||||
return hash('crc32', $hostPart) . '-' . hash('joaat', $host_id) . '-' . hash('fnv164', $host_id);
|
return hash('crc32', $hostPart) . '-' . hash('joaat', $host_id) . '-' . hash('fnv164', $host_id);
|
||||||
|
|
|
@ -206,7 +206,7 @@ class Post
|
||||||
$connector = !in_array($item['network'], Protocol::NATIVE_SUPPORT) ? DI::l10n()->t('Connector Message') : false;
|
$connector = !in_array($item['network'], Protocol::NATIVE_SUPPORT) ? DI::l10n()->t('Connector Message') : false;
|
||||||
|
|
||||||
$shareable = in_array($conv->getProfileOwner(), [0, DI::userSession()->getLocalUserId()]) && $item['private'] != Item::PRIVATE;
|
$shareable = in_array($conv->getProfileOwner(), [0, DI::userSession()->getLocalUserId()]) && $item['private'] != Item::PRIVATE;
|
||||||
$announceable = $shareable && in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::TWITTER, Protocol::TUMBLR]);
|
$announceable = $shareable && in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::TWITTER, Protocol::TUMBLR, Protocol::BLUESKY]);
|
||||||
$commentable = ($item['network'] != Protocol::TUMBLR);
|
$commentable = ($item['network'] != Protocol::TUMBLR);
|
||||||
|
|
||||||
// On Diaspora only toplevel posts can be reshared
|
// On Diaspora only toplevel posts can be reshared
|
||||||
|
|
Loading…
Reference in a new issue