forked from GNUsocial/gnu-social
Type-aware comparison is necessary for Notice is_local/scope
This commit is contained in:
@@ -40,22 +40,9 @@ class FacebookQueueHandler extends QueueHandler
|
||||
|
||||
function handle($notice)
|
||||
{
|
||||
if ($this->_isLocal($notice)) {
|
||||
if ($notice->isLocal()) {
|
||||
return Facebookclient::facebookBroadcastNotice($notice);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the notice was locally created
|
||||
*
|
||||
* @param Notice $notice the notice
|
||||
*
|
||||
* @return boolean locality
|
||||
*/
|
||||
function _isLocal($notice)
|
||||
{
|
||||
return ($notice->is_local == Notice::LOCAL_PUBLIC ||
|
||||
$notice->is_local == Notice::LOCAL_NONPUBLIC);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user