mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 02:35:12 +00:00
federated delete issue
This commit is contained in:
parent
d3520a04b9
commit
8fb88db87b
1 changed files with 4 additions and 10 deletions
|
@ -38,20 +38,14 @@ class ActivityPub
|
|||
return;
|
||||
}
|
||||
|
||||
// Use a cached copy if available, except in the case where we just edited a post.
|
||||
// Then ignore the cached copy.
|
||||
// Use a cached copy if available, except in the case where we just edited
|
||||
// or deleted a post. In these cases ignore the cached copy and create a fresh activity.
|
||||
|
||||
if ($arr['cmd'] !== 'edit_post') {
|
||||
if (!$arr['target_item']['item_deleted'] && !$arr['target_item']['verb'] === 'Update') {
|
||||
$signed_msg = ObjCache::Get($arr['target_item']['mid']);
|
||||
}
|
||||
|
||||
|
||||
// If we have an activity already stored with an LD-signature
|
||||
// which we are sending downstream, use that signed activity as is.
|
||||
// The channel will then sign the HTTP transaction.
|
||||
|
||||
// It is unclear if Mastodon supports the federation delivery model. Initial tests were
|
||||
// inconclusive and the behaviour varied.
|
||||
// If we are relaying the activity, we must have a signed activity.
|
||||
|
||||
if (($arr['channel']['channel_hash'] !== $arr['target_item']['author_xchan']) && (!$signed_msg)) {
|
||||
logger('relayed post with no signed message');
|
||||
|
|
Loading…
Reference in a new issue