kopia lustrzana https://github.com/nextcloud/social
rodzic
f876c25c73
commit
db9a804de0
|
|
@ -54,6 +54,7 @@ use OCA\Social\Service\SignatureService;
|
||||||
use OCA\Social\Service\StreamQueueService;
|
use OCA\Social\Service\StreamQueueService;
|
||||||
use OCA\Social\Service\StreamService;
|
use OCA\Social\Service\StreamService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\DataResponse;
|
||||||
use OCP\AppFramework\Http\Response;
|
use OCP\AppFramework\Http\Response;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
|
|
@ -205,7 +206,7 @@ class ActivityPubController extends Controller {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$body = file_get_contents('php://input');
|
$body = file_get_contents('php://input');
|
||||||
$this->miscService->log('[<<] shared-inbox: ' . $body, 1);
|
$this->miscService->log('[<<] sharedInbox: ' . $body, 1);
|
||||||
|
|
||||||
$requestTime = 0;
|
$requestTime = 0;
|
||||||
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
|
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
|
||||||
|
|
@ -255,8 +256,7 @@ class ActivityPubController extends Controller {
|
||||||
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
|
$origin = $this->signatureService->checkRequest($this->request, $body, $requestTime);
|
||||||
$this->fediverseService->authorized($origin);
|
$this->fediverseService->authorized($origin);
|
||||||
|
|
||||||
// TODO - check the recipient <-> username
|
$actor = $this->cacheActorService->getFromLocalAccount($username);
|
||||||
// $actor = $this->actorService->getActor($username);
|
|
||||||
|
|
||||||
$activity = $this->importService->importFromJson($body);
|
$activity = $this->importService->importFromJson($body);
|
||||||
if (!$this->signatureService->checkObject($activity)) {
|
if (!$this->signatureService->checkObject($activity)) {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ namespace OCA\Social\Model;
|
||||||
use daita\MySmallPhpTools\Traits\TArrayTools;
|
use daita\MySmallPhpTools\Traits\TArrayTools;
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
use OCA\Social\Exceptions\LinkedDataSignatureMissingException;
|
use OCA\Social\Exceptions\LinkedDataSignatureMissingException;
|
||||||
use OCA\Social\Model\ActivityPub\ACore;
|
|
||||||
use OCA\Social\Service\SignatureService;
|
use OCA\Social\Service\SignatureService;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@ class SignatureService {
|
||||||
return true;
|
return true;
|
||||||
} catch (LinkedDataSignatureMissingException $e) {
|
} catch (LinkedDataSignatureMissingException $e) {
|
||||||
$this->miscService->log(
|
$this->miscService->log(
|
||||||
'LinkedDataSignatureMissingException while checkObject : ' . $e->getMessage()
|
'Notice: LinkedDataSignatureMissingException while checkObject : ' . $e->getMessage()
|
||||||
. ' --- ' . json_encode($object), 1
|
. ' --- ' . json_encode($object), 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
"he": "^1.2.0",
|
"he": "^1.2.0",
|
||||||
"linkifyjs": "^2.1.8",
|
"linkifyjs": "^2.1.8",
|
||||||
"tributejs": "^3.7.3",
|
"tributejs": "^3.7.3",
|
||||||
"twemoji": "13.0.1",
|
"twemoji": "12.0.1",
|
||||||
"uuid": "^3.3.3",
|
"uuid": "^3.3.3",
|
||||||
"v-tooltip": "^3.0.0-alpha.11",
|
"v-tooltip": "^3.0.0-alpha.11",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
|
|
|
||||||
|
|
@ -805,10 +805,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abort if the post is a direct message and no valid mentions were found
|
// Abort if the post is a direct message and no valid mentions were found
|
||||||
if (this.type === 'direct' && postData.to.length === 0) {
|
// if (this.type === 'direct' && postData.to.length === 0) {
|
||||||
OC.Notification.showTemporary(t('social', 'Error while trying to post your message: Could not find any valid recipients.'), { type: 'error' })
|
// OC.Notification.showTemporary(t('social', 'Error while trying to post your message: Could not find any valid recipients.'), { type: 'error' })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Post message
|
// Post message
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue