@@ -109,11 +109,10 @@ public static function user_inbox_get( $request ) {
109109 */
110110 \do_action ( 'activitypub_inbox_post ' );
111111
112- $ response = new WP_REST_Response ( $ json , 200 );
112+ $ rest_response = new WP_REST_Response ( $ json , 200 );
113+ $ rest_response ->header ( 'Content-Type ' , 'application/activity+json; charset= ' . get_option ( 'blog_charset ' ) );
113114
114- $ response ->header ( 'Content-Type ' , 'application/activity+json ' );
115-
116- return $ response ;
115+ return $ rest_response ;
117116 }
118117
119118 /**
@@ -138,7 +137,10 @@ public static function user_inbox_post( $request ) {
138137 \do_action ( 'activitypub_inbox ' , $ data , $ user ->get__id (), $ type );
139138 \do_action ( "activitypub_inbox_ {$ type }" , $ data , $ user ->get__id () );
140139
141- return new WP_REST_Response ( array (), 202 );
140+ $ rest_response = new WP_REST_Response ( array (), 202 );
141+ $ rest_response ->header ( 'Content-Type ' , 'application/activity+json; charset= ' . get_option ( 'blog_charset ' ) );
142+
143+ return $ rest_response ;
142144 }
143145
144146 /**
@@ -183,7 +185,10 @@ public static function shared_inbox_post( $request ) {
183185 \do_action ( "activitypub_inbox_ {$ type }" , $ data , $ user ->ID );
184186 }
185187
186- return new WP_REST_Response ( array (), 202 );
188+ $ rest_response = new WP_REST_Response ( array (), 202 );
189+ $ rest_response ->header ( 'Content-Type ' , 'application/activity+json; charset= ' . get_option ( 'blog_charset ' ) );
190+
191+ return $ rest_response ;
187192 }
188193
189194 /**
0 commit comments