@@ -92,6 +92,9 @@ sub assert_is_valid_pdu {
9292 user_id => $user_id ,
9393 );
9494
95+ # The spec does not require the origin field, but Dendrite does. This can be removed
96+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
97+ $proto -> {origin } = $inbound_server -> server_name;
9598 $proto -> {origin_server_ts } = $inbound_server -> time_ms;
9699
97100 $req -> respond_json( {
@@ -273,6 +276,9 @@ sub assert_is_valid_pdu {
273276 state_key type ) ),
274277
275278 event_id => $datastore -> next_event_id,
279+ # The spec does not require the origin field, but Dendrite does. This can be removed
280+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
281+ origin => $local_server_name ,
276282 origin_server_ts => $inbound_server -> time_ms,
277283 );
278284
@@ -441,6 +447,9 @@ sub assert_is_valid_pdu {
441447
442448 $join_event = $body -> {event };
443449
450+ # The spec does not require the origin field, but Dendrite does. This can be removed
451+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
452+ $join_event -> {origin } = $sytest_server_name ;
444453 $join_event -> {origin_server_ts } = $outbound_client -> time_ms;
445454
446455 if ( $room_version eq ' 1' || $room_version eq ' 2' ) {
@@ -853,6 +862,9 @@ sub assert_is_valid_pdu {
853862 user_id => $user_id ,
854863 );
855864
865+ # The spec does not require the origin field, but Dendrite does. This can be removed
866+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
867+ $proto -> {origin } = $inbound_server -> server_name;
856868 $proto -> {origin_server_ts } = $inbound_server -> time_ms;
857869
858870 $req -> respond_json( {
@@ -941,6 +953,9 @@ sub assert_is_valid_pdu {
941953 user_id => $user_id ,
942954 );
943955
956+ # The spec does not require the origin field, but Dendrite does. This can be removed
957+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
958+ $proto -> {origin } = $inbound_server -> server_name;
944959 $proto -> {origin_server_ts } = $inbound_server -> time_ms;
945960
946961 $req -> respond_json( {
@@ -1034,6 +1049,9 @@ sub assert_is_valid_pdu {
10341049 user_id => $user_id ,
10351050 );
10361051
1052+ # The spec does not require the origin field, but Dendrite does. This can be removed
1053+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
1054+ $proto -> {origin } = $inbound_server -> server_name;
10371055 $proto -> {origin_server_ts } = $inbound_server -> time_ms;
10381056
10391057 $req -> respond_json( {
@@ -1173,7 +1191,9 @@ sub assert_is_valid_pdu {
11731191 ( map { $_ => $protoevent -> {$_ } } qw(
11741192 auth_events content depth prev_events room_id sender
11751193 state_key type ) ),
1176-
1194+ # The spec does not require the origin field, but Dendrite does. This can be removed
1195+ # once this issue gets solved: https://github.com/matrix-org/dendrite/issues/2736
1196+ origin => $local_server_name ,
11771197 origin_server_ts => $inbound_server -> time_ms,
11781198 );
11791199 # Insert a "bad" value into the send join, in this case a float.
0 commit comments