From 87d853d56b00abf8de433bef8053924e748d05bc Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 22 Mar 2016 17:33:46 +0000 Subject: [PATCH] If we don't get a specific event because of permissions, say so --- src/components/structures/TimelinePanel.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 8ebe764ecf..8c2e14a361 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -587,9 +587,15 @@ var TimelinePanel = React.createClass({ }); }; } + var message = "Vector was trying to load a specific point in this room's timeline but "; + if (error.errcode == 'M_FORBIDDEN') { + message += "you do not have permission to view the message in question."; + } else { + message += "was unable to find it."; + } Modal.createDialog(ErrorDialog, { title: "Failed to load timeline position", - description: "Vector was trying to load a specific point in this room's timeline but was unable to find it.", + description: message, onFinished: onFinished, }); }