kopia lustrzana https://github.com/nextcloud/social
add creation time on SocialAppNotification
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/530/head
rodzic
a9e46125cc
commit
ae4ba193b8
|
@ -110,6 +110,9 @@ class SocialAppNotificationInterface implements IActivityPubInterface {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$notification->setPublished(date("c"));
|
||||||
|
$notification->convertPublished();
|
||||||
|
|
||||||
$this->miscService->log('Generating notification: ' . json_encode($notification, JSON_UNESCAPED_SLASHES), 1);
|
$this->miscService->log('Generating notification: ' . json_encode($notification, JSON_UNESCAPED_SLASHES), 1);
|
||||||
$this->streamRequest->save($notification);
|
$this->streamRequest->save($notification);
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,13 +254,15 @@ class FollowInterface implements IActivityPubInterface {
|
||||||
* @param Follow $follow
|
* @param Follow $follow
|
||||||
*
|
*
|
||||||
* @throws ItemUnknownException
|
* @throws ItemUnknownException
|
||||||
|
* @throws SocialAppConfigException
|
||||||
*/
|
*/
|
||||||
private function generateNotification(Follow $follow) {
|
private function generateNotification(Follow $follow) {
|
||||||
/** @var SocialAppNotificationInterface $notificationInterface */
|
/** @var SocialAppNotificationInterface $notificationInterface */
|
||||||
$notificationInterface =
|
$notificationInterface =
|
||||||
AP::$activityPub->getInterfaceFromType(SocialAppNotification::TYPE);
|
AP::$activityPub->getInterfaceFromType(SocialAppNotification::TYPE);
|
||||||
|
|
||||||
$notification = new SocialAppNotification();
|
/** @var SocialAppNotification $notification */
|
||||||
|
$notification = AP::$activityPub->getItemFromType(SocialAppNotification::TYPE);
|
||||||
$notification->setAttributedTo($follow->getActorId())
|
$notification->setAttributedTo($follow->getActorId())
|
||||||
->setId($follow->getId() . '/notification')
|
->setId($follow->getId() . '/notification')
|
||||||
->setSummary('{actor} is following you')
|
->setSummary('{actor} is following you')
|
||||||
|
|
Ładowanie…
Reference in New Issue