mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-06 04:36:21 +02:00
fix loop
This commit is contained in:
parent
3270e876d7
commit
73f157d769
@ -100,16 +100,14 @@ export function useRoomStatusBarViewModel({ room }: IProps): RoomStatusBarVM {
|
||||
let consentError: MatrixError | null = null;
|
||||
let resourceLimitError: MatrixError | null = null;
|
||||
for (const m of unsentMessages) {
|
||||
if (!m.error) {
|
||||
continue;
|
||||
}
|
||||
if (m.error.errcode === "M_CONSENT_NOT_GIVEN") {
|
||||
consentError = m.error;
|
||||
break;
|
||||
}
|
||||
if (m.error.errcode === "M_RESOURCE_LIMIT_EXCEEDED") {
|
||||
resourceLimitError = m.error;
|
||||
break;
|
||||
if (m.error) {
|
||||
if (m.error.errcode === "M_RESOURCE_LIMIT_EXCEEDED") {
|
||||
resourceLimitError = m.error;
|
||||
}
|
||||
if (m.error.errcode === "M_CONSENT_NOT_GIVEN") {
|
||||
consentError = m.error;
|
||||
break; // This is the most important thing to show, so break here if we find one.
|
||||
}
|
||||
}
|
||||
}
|
||||
if (consentError) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user