diff --git a/examples/basic-fork.json b/examples/basic-fork.json new file mode 100644 index 0000000..38e96d1 --- /dev/null +++ b/examples/basic-fork.json @@ -0,0 +1,9 @@ +{"type": "m.room.create", "depth": 1, "hashes": {"sha256": "3zF8Kk+J/ZGrfUjfgg3OjtzMVsvOVDIC+Ew0BS3L4gY"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"creator": "@kegan:matrix.org", "room_version": "10"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY", "unsigned": {"age_ts": 1728652174091}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "4/m8rQEZupyPn+SyNMesB5BqNux66Tyyl/bmBKVQay3jsNZuhUdelN056kQJUhIg7HPRes17ghKifHOvaOvvAw"}}, "auth_events": [], "prev_events": [], "origin_server_ts": 1728652174091} +{"type": "m.room.member", "depth": 2, "hashes": {"sha256": "VVIP2Wxb+nyzhgcvrJD82nNQYb3Vd5ZbOOIRbu8YGP8"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"avatar_url": "mxc://matrix.org/gImPYMAYQWpffViAorQsjbIs", "membership": "join", "displayname": "Kegan"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "unsigned": {"age_ts": 1728652174308}, "state_key": "@kegan:matrix.org", "signatures": {"matrix.org": {"ed25519:a_RXGa": "c01Fydab2/KdQ+EqVouiii+W1YGxHD4PmNn/U3A4qsF9Bwc9Y0A9iyTXMvUR4Nsz/1YfkDgchkj0/2qBJZ9ECQ"}}, "auth_events": ["$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "origin_server_ts": 1728652174308} +{"type": "m.room.power_levels", "depth": 3, "hashes": {"sha256": "mQxzMn0yPhfD+KxoQFIDQVQvMWX9I3ujaTShRSYYKk8"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"ban": 50, "kick": 50, "users": {"@kegan:matrix.org": 100}, "events": {"m.room.name": 50, "m.room.avatar": 50, "m.room.tombstone": 100, "m.room.encryption": 100, "m.room.server_acl": 100, "m.room.power_levels": 100, "m.room.canonical_alias": 50, "m.room.history_visibility": 100}, "invite": 50, "redact": 50, "historical": 100, "m.call.invite": 50, "state_default": 50, "users_default": 0, "events_default": 0}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "unsigned": {"age_ts": 1728652174519}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "ZHbQCeWaaHl249hlVpzm2UU8/1SWtAxDa6Z/ge5Mk3NHalC4WfbWtzjLzXrhfVYkhSTG0lfV6/EDao7bPuEjBQ"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo"], "origin_server_ts": 1728652174519} +{"type": "m.room.canonical_alias", "depth": 4, "hashes": {"sha256": "WWyr4BL6gRVn2PWjSQ2wYWO6hVF3OQ/vM89QxpFMRnk"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"alias": "#test-resolve-room:matrix.org"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$aCToy0aQOfhURh5jsakQ9Ovk6fMGbWnmnGh7gkZUiFI", "unsigned": {"age_ts": 1728652174544}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "eji69yq5bybnpE9m5OZh2sFeaB7MZKolMhDqlunnpyegPI9VgUtPSZF4kcXZ9ZczBoLA7eC4/HbhwpCQ7c1aAg"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg"], "origin_server_ts": 1728652174544} +{"type": "m.room.join_rules", "depth": 5, "hashes": {"sha256": "HSYkwp9nfNTJX8zMJt+s6Q96oapIDRHyfcuVs71P58M"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"join_rule": "public"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$HLdW9q8VIIPTpyKfF85fDYrEu8UAp861wdpUZVzYgJQ", "unsigned": {"age_ts": 1728652174545}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "MDPlgzj97v5QwP60fzui6il5NHGU3BbUfm/BBxeLp79/HpPD6hYlkYYeLXoqI4N1AxtbLa3XtldGPU6vzR3HCw"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$aCToy0aQOfhURh5jsakQ9Ovk6fMGbWnmnGh7gkZUiFI"], "origin_server_ts": 1728652174545} +{"type": "m.room.history_visibility", "depth": 6, "hashes": {"sha256": "7jjPzCZW37vDlpTVHhpNdt2a8ZEITtR8PrduIVAFOcw"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"history_visibility": "shared"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$iojoMzC2XDpR0YHDdmQD1p0E9S1YCj4GsC63QWIUyJY", "unsigned": {"age_ts": 1728652174545}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "F9yzfRxG54oiWrYVW+G0Q7SuAhK42XAIUVizd/yLRbXG91uS/SSH7ZAA4OAAah8afmWYuzWXvUgImCqziQ+KBg"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$HLdW9q8VIIPTpyKfF85fDYrEu8UAp861wdpUZVzYgJQ"], "origin_server_ts": 1728652174545} +{"type": "m.room.name", "depth": 7, "hashes": {"sha256": "Cd6glFNK04BzaNqHCaL/fKqSby3oMeEYIAKD3sxa8ok"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"name": "test resolve room"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$A5z9GLL8ABCYg4SKujf_ehtW52yGoGhZuQGc0nspEeU", "unsigned": {"age_ts": 1728652174546}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "ypYzuw8nG+38o6WM4OrFeEI+xwk1QvIxZBRB3RtZGtf2y6Z3VgliO7hbsYx/AjbRCstMsrme1DEV8OiMeWIYDw"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$iojoMzC2XDpR0YHDdmQD1p0E9S1YCj4GsC63QWIUyJY"], "origin_server_ts": 1728652174546} +{"type": "m.room.name", "depth": 7, "hashes": {"sha256": "Cd6glFNK04BzaNqHCaL/fKqSby3oMeEYIAKD3sxa8ok"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"name": "test resolve room forked"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$A5z9GLL8ABCYg4SKujf_ehtW52yGoGhZuQGc0nspEeU-fork", "unsigned": {"age_ts": 1728652174546}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "ypYzuw8nG+38o6WM4OrFeEI+xwk1QvIxZBRB3RtZGtf2y6Z3VgliO7hbsYx/AjbRCstMsrme1DEV8OiMeWIYDw"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$iojoMzC2XDpR0YHDdmQD1p0E9S1YCj4GsC63QWIUyJY"], "origin_server_ts": 1728652174546} + diff --git a/examples/simple.json b/examples/simple.json new file mode 100644 index 0000000..c157d7b --- /dev/null +++ b/examples/simple.json @@ -0,0 +1,9 @@ +{"type": "m.room.create", "depth": 1, "hashes": {"sha256": "3zF8Kk+J/ZGrfUjfgg3OjtzMVsvOVDIC+Ew0BS3L4gY"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"creator": "@kegan:matrix.org", "room_version": "10"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY", "unsigned": {"age_ts": 1728652174091}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "4/m8rQEZupyPn+SyNMesB5BqNux66Tyyl/bmBKVQay3jsNZuhUdelN056kQJUhIg7HPRes17ghKifHOvaOvvAw"}}, "auth_events": [], "prev_events": [], "origin_server_ts": 1728652174091} +{"type": "m.room.member", "depth": 2, "hashes": {"sha256": "VVIP2Wxb+nyzhgcvrJD82nNQYb3Vd5ZbOOIRbu8YGP8"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"avatar_url": "mxc://matrix.org/gImPYMAYQWpffViAorQsjbIs", "membership": "join", "displayname": "Kegan"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "unsigned": {"age_ts": 1728652174308}, "state_key": "@kegan:matrix.org", "signatures": {"matrix.org": {"ed25519:a_RXGa": "c01Fydab2/KdQ+EqVouiii+W1YGxHD4PmNn/U3A4qsF9Bwc9Y0A9iyTXMvUR4Nsz/1YfkDgchkj0/2qBJZ9ECQ"}}, "auth_events": ["$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "origin_server_ts": 1728652174308} +{"type": "m.room.power_levels", "depth": 3, "hashes": {"sha256": "mQxzMn0yPhfD+KxoQFIDQVQvMWX9I3ujaTShRSYYKk8"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"ban": 50, "kick": 50, "users": {"@kegan:matrix.org": 100}, "events": {"m.room.name": 50, "m.room.avatar": 50, "m.room.tombstone": 100, "m.room.encryption": 100, "m.room.server_acl": 100, "m.room.power_levels": 100, "m.room.canonical_alias": 50, "m.room.history_visibility": 100}, "invite": 50, "redact": 50, "historical": 100, "m.call.invite": 50, "state_default": 50, "users_default": 0, "events_default": 0}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "unsigned": {"age_ts": 1728652174519}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "ZHbQCeWaaHl249hlVpzm2UU8/1SWtAxDa6Z/ge5Mk3NHalC4WfbWtzjLzXrhfVYkhSTG0lfV6/EDao7bPuEjBQ"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo"], "origin_server_ts": 1728652174519} +{"type": "m.room.canonical_alias", "depth": 4, "hashes": {"sha256": "WWyr4BL6gRVn2PWjSQ2wYWO6hVF3OQ/vM89QxpFMRnk"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"alias": "#test-resolve-room:matrix.org"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$aCToy0aQOfhURh5jsakQ9Ovk6fMGbWnmnGh7gkZUiFI", "unsigned": {"age_ts": 1728652174544}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "eji69yq5bybnpE9m5OZh2sFeaB7MZKolMhDqlunnpyegPI9VgUtPSZF4kcXZ9ZczBoLA7eC4/HbhwpCQ7c1aAg"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg"], "origin_server_ts": 1728652174544} +{"type": "m.room.join_rules", "depth": 5, "hashes": {"sha256": "HSYkwp9nfNTJX8zMJt+s6Q96oapIDRHyfcuVs71P58M"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"join_rule": "public"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$HLdW9q8VIIPTpyKfF85fDYrEu8UAp861wdpUZVzYgJQ", "unsigned": {"age_ts": 1728652174545}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "MDPlgzj97v5QwP60fzui6il5NHGU3BbUfm/BBxeLp79/HpPD6hYlkYYeLXoqI4N1AxtbLa3XtldGPU6vzR3HCw"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$aCToy0aQOfhURh5jsakQ9Ovk6fMGbWnmnGh7gkZUiFI"], "origin_server_ts": 1728652174545} +{"type": "m.room.history_visibility", "depth": 6, "hashes": {"sha256": "7jjPzCZW37vDlpTVHhpNdt2a8ZEITtR8PrduIVAFOcw"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"history_visibility": "shared"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$iojoMzC2XDpR0YHDdmQD1p0E9S1YCj4GsC63QWIUyJY", "unsigned": {"age_ts": 1728652174545}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "F9yzfRxG54oiWrYVW+G0Q7SuAhK42XAIUVizd/yLRbXG91uS/SSH7ZAA4OAAah8afmWYuzWXvUgImCqziQ+KBg"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$HLdW9q8VIIPTpyKfF85fDYrEu8UAp861wdpUZVzYgJQ"], "origin_server_ts": 1728652174545} +{"type": "m.room.name", "depth": 7, "hashes": {"sha256": "Cd6glFNK04BzaNqHCaL/fKqSby3oMeEYIAKD3sxa8ok"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"name": "test resolve room"}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$A5z9GLL8ABCYg4SKujf_ehtW52yGoGhZuQGc0nspEeU", "unsigned": {"age_ts": 1728652174546}, "state_key": "", "signatures": {"matrix.org": {"ed25519:a_RXGa": "ypYzuw8nG+38o6WM4OrFeEI+xwk1QvIxZBRB3RtZGtf2y6Z3VgliO7hbsYx/AjbRCstMsrme1DEV8OiMeWIYDw"}}, "auth_events": ["$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$iojoMzC2XDpR0YHDdmQD1p0E9S1YCj4GsC63QWIUyJY"], "origin_server_ts": 1728652174546} +{"type": "m.room.message", "depth": 8, "hashes": {"sha256": "l02uJl91yHpVopMkChN4gCJIy4zFf4Go/iICtr0VKNk"}, "origin": "matrix.org", "sender": "@kegan:matrix.org", "content": {"body": "this is the first message in the room.", "msgtype": "m.text", "m.mentions": {}}, "room_id": "!jpViMZBlnuKxAKpsem:matrix.org", "event_id": "$_-YRKNmQfY6o9ibTvOPlHFVxkHvh1k3avAPUn49w9nE", "unsigned": {"age_ts": 1728652182530}, "signatures": {"matrix.org": {"ed25519:a_RXGa": "kjHV6A//PNmAmdz16MbhgqPi8/5BujXLTwcRcz1aPejZvWIg85NBWwqQpfy1jFIct4lMhADVEu4Ebjr8Odn/DQ"}}, "auth_events": ["$OaedSihFH9ThMiJsVKDIatVL5CAgtETWGuUUVgAjOAg", "$dVlIkqbTnz6_RRggTuTxuYNLdAtbkVSY47Lb-1rUWIo", "$ayBJ5cK-zydid3RXCV7OaqK-Wh9NZcpBwSqK0H5O1NY"], "prev_events": ["$A5z9GLL8ABCYg4SKujf_ehtW52yGoGhZuQGc0nspEeU"], "origin_server_ts": 1728652182530} + diff --git a/index.html b/index.html index 1e8e055..7d6be65 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,7 @@ +