mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Merge pull request #2125 from matrix-org/dbkr/room_too_old_error
Support M_INCOMPATIBLE_ROOM_VERSION
This commit is contained in:
		
						commit
						2816175393
					
				@ -203,8 +203,11 @@
 | 
				
			|||||||
    "Your browser does not support the required cryptography extensions": "Your browser does not support the required cryptography extensions",
 | 
					    "Your browser does not support the required cryptography extensions": "Your browser does not support the required cryptography extensions",
 | 
				
			||||||
    "Not a valid Riot keyfile": "Not a valid Riot keyfile",
 | 
					    "Not a valid Riot keyfile": "Not a valid Riot keyfile",
 | 
				
			||||||
    "Authentication check failed: incorrect password?": "Authentication check failed: incorrect password?",
 | 
					    "Authentication check failed: incorrect password?": "Authentication check failed: incorrect password?",
 | 
				
			||||||
 | 
					    "Sorry, your homeserver is too old to participate in this room.": "Sorry, your homeserver is too old to participate in this room.",
 | 
				
			||||||
 | 
					    "Please contact your homeserver administrator.": "Please contact your homeserver administrator.",
 | 
				
			||||||
    "Failed to join room": "Failed to join room",
 | 
					    "Failed to join room": "Failed to join room",
 | 
				
			||||||
    "Message Pinning": "Message Pinning",
 | 
					    "Message Pinning": "Message Pinning",
 | 
				
			||||||
 | 
					    "Increase performance by only loading room members on first view": "Increase performance by only loading room members on first view",
 | 
				
			||||||
    "Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing",
 | 
					    "Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing",
 | 
				
			||||||
    "Use compact timeline layout": "Use compact timeline layout",
 | 
					    "Use compact timeline layout": "Use compact timeline layout",
 | 
				
			||||||
    "Hide removed messages": "Hide removed messages",
 | 
					    "Hide removed messages": "Hide removed messages",
 | 
				
			||||||
@ -543,10 +546,6 @@
 | 
				
			|||||||
    "Internal room ID: ": "Internal room ID: ",
 | 
					    "Internal room ID: ": "Internal room ID: ",
 | 
				
			||||||
    "Room version number: ": "Room version number: ",
 | 
					    "Room version number: ": "Room version number: ",
 | 
				
			||||||
    "Add a topic": "Add a topic",
 | 
					    "Add a topic": "Add a topic",
 | 
				
			||||||
    "There is a known vulnerability affecting this room.": "There is a known vulnerability affecting this room.",
 | 
					 | 
				
			||||||
    "This room version is vulnerable to malicious modification of room state.": "This room version is vulnerable to malicious modification of room state.",
 | 
					 | 
				
			||||||
    "Click here to upgrade to the latest room version and ensure room integrity is protected.": "Click here to upgrade to the latest room version and ensure room integrity is protected.",
 | 
					 | 
				
			||||||
    "Only room administrators will see this warning": "Only room administrators will see this warning",
 | 
					 | 
				
			||||||
    "Search…": "Search…",
 | 
					    "Search…": "Search…",
 | 
				
			||||||
    "This Room": "This Room",
 | 
					    "This Room": "This Room",
 | 
				
			||||||
    "All Rooms": "All Rooms",
 | 
					    "All Rooms": "All Rooms",
 | 
				
			||||||
@ -865,12 +864,6 @@
 | 
				
			|||||||
    "Ignore request": "Ignore request",
 | 
					    "Ignore request": "Ignore request",
 | 
				
			||||||
    "Loading device info...": "Loading device info...",
 | 
					    "Loading device info...": "Loading device info...",
 | 
				
			||||||
    "Encryption key request": "Encryption key request",
 | 
					    "Encryption key request": "Encryption key request",
 | 
				
			||||||
    "Upgrade Room Version": "Upgrade Room Version",
 | 
					 | 
				
			||||||
    "Upgrading this room requires closing down the current instance of the room and creating a new room it its place. To give room members the best possible experience, we will:": "Upgrading this room requires closing down the current instance of the room and creating a new room it its place. To give room members the best possible experience, we will:",
 | 
					 | 
				
			||||||
    "Create a new room with the same name, description and avatar": "Create a new room with the same name, description and avatar",
 | 
					 | 
				
			||||||
    "Update any local room aliases to point to the new room": "Update any local room aliases to point to the new room",
 | 
					 | 
				
			||||||
    "Stop users from speaking in the old version of the room, and post a message advising users to move to the new room": "Stop users from speaking in the old version of the room, and post a message advising users to move to the new room",
 | 
					 | 
				
			||||||
    "Put a link back to the old room at the start of the new room so people can see old messages": "Put a link back to the old room at the start of the new room so people can see old messages",
 | 
					 | 
				
			||||||
    "Sign out": "Sign out",
 | 
					    "Sign out": "Sign out",
 | 
				
			||||||
    "Log out and remove encryption keys?": "Log out and remove encryption keys?",
 | 
					    "Log out and remove encryption keys?": "Log out and remove encryption keys?",
 | 
				
			||||||
    "Clear Storage and Sign Out": "Clear Storage and Sign Out",
 | 
					    "Clear Storage and Sign Out": "Clear Storage and Sign Out",
 | 
				
			||||||
@ -1121,6 +1114,8 @@
 | 
				
			|||||||
    "Labs": "Labs",
 | 
					    "Labs": "Labs",
 | 
				
			||||||
    "These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
 | 
					    "These are experimental features that may break in unexpected ways": "These are experimental features that may break in unexpected ways",
 | 
				
			||||||
    "Use with caution": "Use with caution",
 | 
					    "Use with caution": "Use with caution",
 | 
				
			||||||
 | 
					    "Lazy loading members not supported": "Lazy loading members not supported",
 | 
				
			||||||
 | 
					    "Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver.",
 | 
				
			||||||
    "Deactivate my account": "Deactivate my account",
 | 
					    "Deactivate my account": "Deactivate my account",
 | 
				
			||||||
    "Clear Cache": "Clear Cache",
 | 
					    "Clear Cache": "Clear Cache",
 | 
				
			||||||
    "Clear Cache and Reload": "Clear Cache and Reload",
 | 
					    "Clear Cache and Reload": "Clear Cache and Reload",
 | 
				
			||||||
@ -1231,8 +1226,5 @@
 | 
				
			|||||||
    "Import": "Import",
 | 
					    "Import": "Import",
 | 
				
			||||||
    "Failed to set direct chat tag": "Failed to set direct chat tag",
 | 
					    "Failed to set direct chat tag": "Failed to set direct chat tag",
 | 
				
			||||||
    "Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
 | 
					    "Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
 | 
				
			||||||
    "Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
 | 
					    "Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
 | 
				
			||||||
    "Increase performance by only loading room members on first view": "Increase performance by only loading room members on first view",
 | 
					 | 
				
			||||||
    "Lazy loading members not supported": "Lazy load members not supported",
 | 
					 | 
				
			||||||
    "Lazy loading is not supported by your current homeserver.": "Lazy loading is not supported by your current homeserver."
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -223,7 +223,13 @@ class RoomViewStore extends Store {
 | 
				
			|||||||
                action: 'join_room_error',
 | 
					                action: 'join_room_error',
 | 
				
			||||||
                err: err,
 | 
					                err: err,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            const msg = err.message ? err.message : JSON.stringify(err);
 | 
					            let msg = err.message ? err.message : JSON.stringify(err);
 | 
				
			||||||
 | 
					            if (err.errcode === 'M_INCOMPATIBLE_ROOM_VERSION') {
 | 
				
			||||||
 | 
					                msg = <div>
 | 
				
			||||||
 | 
					                    {_t("Sorry, your homeserver is too old to participate in this room.")}<br />
 | 
				
			||||||
 | 
					                    {_t("Please contact your homeserver administrator.")}
 | 
				
			||||||
 | 
					                </div>;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
 | 
					            const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
 | 
				
			||||||
            Modal.createTrackedDialog('Failed to join room', '', ErrorDialog, {
 | 
					            Modal.createTrackedDialog('Failed to join room', '', ErrorDialog, {
 | 
				
			||||||
                title: _t("Failed to join room"),
 | 
					                title: _t("Failed to join room"),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user