[PLUGIN][ActivityPub][Model][Note] Federate attentions out
This commit is contained in:
parent
8cf60275e6
commit
8f60fc4685
@ -40,6 +40,7 @@ use App\Core\Event;
|
||||
use App\Core\GSFile;
|
||||
use App\Core\HTTPClient;
|
||||
use App\Entity\NoteType;
|
||||
use Component\Notification\Entity\Attention;
|
||||
use function App\Core\I18n\_m;
|
||||
use App\Core\Log;
|
||||
use App\Core\Router\Router;
|
||||
@ -370,6 +371,11 @@ class Note extends Model
|
||||
throw new ServerException('Found an unknown visibility scope which cannot federate.');
|
||||
}
|
||||
|
||||
$attention_cc = DB::findBy(Attention::class, ['note_id' => $object->getId()]);
|
||||
foreach($attention_cc as $cc_id) {
|
||||
$attr['cc'][] = \App\Entity\Actor::getById($cc_id->getTargetId())->getUri(Router::ABSOLUTE_URL);
|
||||
}
|
||||
|
||||
// Mentions
|
||||
foreach ($object->getNotificationTargets() as $mention) {
|
||||
$attr['tag'][] = [
|
||||
|
Loading…
Reference in New Issue
Block a user