mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
Possible or at least partial solution to issue #133 where Announce activities are filtered to prevent overwhelming conversations with redundant workarounds for Mastodon behaviour.
This commit is contained in:
parent
9b079dd584
commit
c72c37fffb
2 changed files with 3 additions and 16 deletions
|
@ -749,18 +749,6 @@ class Notifier implements DaemonInterface
|
|||
|
||||
// default: zot or nomad protocol
|
||||
|
||||
// Prevent zot6/Nomad delivery of group comment boosts, which are not required for conversational platforms.
|
||||
// ActivityPub conversational platforms may wish to filter these if they don't want or require them.
|
||||
// We will assume here that if $target_item exists and has a verb that it is an actual item structure
|
||||
// so we won't need to check the existence of the other item fields prior to evaluation.
|
||||
|
||||
// This shouldn't produce false positives on comment boosts that were generated on other platforms
|
||||
// because we won't be delivering them.
|
||||
|
||||
if (isset($target_item) && isset($target_item['verb']) && $target_item['verb'] === 'Announce' && $target_item['author_xchan'] === $target_item['owner_xchan'] && ! intval($target_item['item_thread_top'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$hash = new_uuid();
|
||||
|
||||
$env = (($hub_env && $hub_env[$hub['hubloc_site_id']]) ? $hub_env[$hub['hubloc_site_id']] : '');
|
||||
|
|
|
@ -98,16 +98,15 @@ class Channel extends Controller
|
|||
|
||||
// An ActivityStreams actor record is more or less required for ActivityStreams compliance
|
||||
// unless the actor object is inlined into every activity/object. This implies that it
|
||||
// is more or less required for the Zot6 protocol, which uses ActivityStreams as a content
|
||||
// serialisation and which doesn't always include the full actor record with every
|
||||
// is more or less required for the Nomad/Zot6 protocols, which use ActivityStreams as a content
|
||||
// serialisation and which don't always include the full actor record with every
|
||||
// activity/object.
|
||||
|
||||
// "more or less" means it isn't spelled out in the ActivityStreams spec, but a number of
|
||||
// things will break in subtle ways if it isn't provided.
|
||||
|
||||
// The ActivityPub protocol requires an 'inbox', which will not be present in this record
|
||||
// if/when the ActivityPub protocol is disabled. This will be the case when using the Redmatrix
|
||||
// fork of Zap; which disables ActivityPub connectivity by default.
|
||||
// if/when the ActivityPub protocol is disabled.
|
||||
|
||||
if (ActivityStreams::is_as_request()) {
|
||||
// Somebody may attempt an ActivityStreams fetch on one of our message permalinks
|
||||
|
|
Loading…
Reference in a new issue