File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -792,20 +792,41 @@ public static function dataSanitizeFediverseServer(): array {
792792 '@foo@example.com ' ,
793793 'foo@example.com ' ,
794794 true ,
795- json_encode (['username ' => 'foo ' ]),
795+ json_encode ([
796+ 'subject ' => 'acct:foo@example.com ' ,
797+ 'links ' => [
798+ [
799+ 'rel ' => 'self ' ,
800+ 'type ' => 'application/activity+json ' ,
801+ 'href ' => 'https://example.com/users/foo ' ,
802+ ],
803+ ],
804+ ]),
796805 ],
797806 'valid response - no at ' => [
798807 'foo@example.com ' ,
799808 'foo@example.com ' ,
800809 true ,
801- json_encode (['username ' => 'foo ' ]),
810+ json_encode ([
811+ 'subject ' => 'acct:foo@example.com ' ,
812+ 'links ' => [
813+ [
814+ 'rel ' => 'self ' ,
815+ 'type ' => 'application/activity+json ' ,
816+ 'href ' => 'https://example.com/users/foo ' ,
817+ ],
818+ ],
819+ ]),
802820 ],
803821 // failures
804822 'invalid response ' => [
805823 '@foo@example.com ' ,
806824 null ,
807825 true ,
808- json_encode (['not found ' ]),
826+ json_encode ([
827+ 'subject ' => 'acct:foo@example.com ' ,
828+ 'links ' => [],
829+ ]),
809830 ],
810831 'no response ' => [
811832 '@foo@example.com ' ,
@@ -817,7 +838,9 @@ public static function dataSanitizeFediverseServer(): array {
817838 '@foo@example.com ' ,
818839 null ,
819840 true ,
820- json_encode (['username ' => 'foo@other.example.com ' ]),
841+ json_encode ([
842+ 'links ' => [],
843+ ]),
821844 ],
822845 ];
823846 }
You can’t perform that action at this time.
0 commit comments