fix object handling
This commit is contained in:
parent
e65b70763d
commit
7a360dbf6f
1 changed files with 8 additions and 4 deletions
|
@ -79,7 +79,7 @@ class Activity extends Base_Object {
|
||||||
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object-term
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object-term
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* | ObjectType
|
* | Base_Objectr
|
||||||
* | Link
|
* | Link
|
||||||
* | null
|
* | null
|
||||||
*/
|
*/
|
||||||
|
@ -173,12 +173,16 @@ class Activity extends Base_Object {
|
||||||
*
|
*
|
||||||
* @see https://www.w3.org/TR/activitypub/#object-without-create
|
* @see https://www.w3.org/TR/activitypub/#object-without-create
|
||||||
*
|
*
|
||||||
* @param \Activitypub\Activity\Base_Object $object
|
* @param string|Base_Objectr|Link|null $object
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set_object( Base_Object $object ) {
|
public function set_object( $object ) {
|
||||||
parent::set_object( $object );
|
$this->set( 'object', $object );
|
||||||
|
|
||||||
|
if ( ! is_object( $object ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( array( 'to', 'bto', 'cc', 'bcc', 'audience' ) as $i ) {
|
foreach ( array( 'to', 'bto', 'cc', 'bcc', 'audience' ) as $i ) {
|
||||||
$this->set( $i, $object->get( $i ) );
|
$this->set( $i, $object->get( $i ) );
|
||||||
|
|
Loading…
Reference in a new issue