Only OStatus distribute if profile hasRight to PUBLICNOTICE

This commit is contained in:
Mikael Nordfeldth 2016-03-02 12:42:09 +01:00
parent 53772ba305
commit e4e0a39dad

View File

@ -129,7 +129,7 @@ class OStatusPlugin extends Plugin
*/ */
function onStartEnqueueNotice($notice, &$transports) function onStartEnqueueNotice($notice, &$transports)
{ {
if ($notice->inScope(null)) { if ($notice->inScope(null) && $notice->getProfile()->hasRight(Right::PUBLICNOTICE)) {
// put our transport first, in case there's any conflict (like OMB) // put our transport first, in case there's any conflict (like OMB)
array_unshift($transports, 'ostatus'); array_unshift($transports, 'ostatus');
$this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing"); $this->log(LOG_INFO, "Notice {$notice->id} queued for OStatus processing");