You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Support active user limit on message send
For https://github.com/vector-im/riot-web/issues/7091
This commit is contained in:
		@@ -309,10 +309,14 @@ module.exports = React.createClass({
 | 
			
		||||
            );
 | 
			
		||||
        } else {
 | 
			
		||||
            let consentError = null;
 | 
			
		||||
            let mauError = null;
 | 
			
		||||
            for (const m of unsentMessages) {
 | 
			
		||||
                if (m.error && m.error.errcode === 'M_CONSENT_NOT_GIVEN') {
 | 
			
		||||
                    consentError = m.error;
 | 
			
		||||
                    break;
 | 
			
		||||
                } else if (m.error && m.error.errcode === 'M_MAU_LIMIT_EXCEEDED') {
 | 
			
		||||
                    mauError = m.error;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (consentError) {
 | 
			
		||||
@@ -327,6 +331,8 @@ module.exports = React.createClass({
 | 
			
		||||
                            </a>,
 | 
			
		||||
                    },
 | 
			
		||||
                );
 | 
			
		||||
            } else if (mauError) {
 | 
			
		||||
                title = _t("Your message wasn’t sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.");
 | 
			
		||||
            } else if (
 | 
			
		||||
                unsentMessages.length === 1 &&
 | 
			
		||||
                unsentMessages[0].error &&
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user