From 3b0b836637aa42ef22de4fb8b4c294cd24113a1c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 22 Aug 2018 17:54:02 +0100 Subject: [PATCH] Change format of server usage limit message As per https://github.com/matrix-org/matrix-doc/issues/1452 / https://github.com/matrix-org/synapse/pull/3680/ --- src/components/structures/LoggedInView.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 2bc6522232..0c4688a411 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -434,7 +434,10 @@ const LoggedInView = React.createClass({ } const usageLimitEvent = this.state.serverNoticeEvents.find((e) => { - return e && e.getType() === 'm.server_notice.usage_limit_reached'; + return ( + e && e.getType() === 'm.room.message' && + e.getContent()['server_notice_type'] === 'm.server_notice.usage_limit_reached' + ); }); let topBar;