File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 77
88namespace Activitypub \Collection ;
99
10+ use Activitypub \Activity \Actor ;
1011use WP_Error ;
1112use WP_User_Query ;
1213use Activitypub \Model \User ;
@@ -350,11 +351,11 @@ public static function get_type_by_id( $user_id ) {
350351 * Returns the actor from cached data.
351352 *
352353 * @param string $cached_data The cached data.
353- * @return User|Blog|Application The actor.
354+ * @return Cached_Actor|\WP_Error The actor or WP_Error if invalid data .
354355 */
355356 public static function actor_from_cached_data ( $ cached_data ) {
356357 // Decode the cached data.
357- $ actor_data = \json_decode ( $ cached_data, true );
358+ $ actor_data = Actor:: init_from_json ( $ cached_data );
358359
359360 if ( ! $ actor_data || ! is_array ( $ actor_data ) ) {
360361 return new \WP_Error (
You can’t perform that action at this time.
0 commit comments