blocked all nextcloud requests in demo mode to stop fake-credential logins tripping brute-force protection

This commit is contained in:
2026-09-27 21:40:55 +02:00
parent c455bb1cae
commit eddd294a34
6 changed files with 55 additions and 3 deletions
@@ -3,6 +3,7 @@ import 'dart:developer';
import 'package:flutter/widgets.dart';
import '../../../../../api/demo/demo_mode.dart';
import '../../../../../api/marianumcloud/talk/chat/get_chat_history.dart';
import '../../../../../api/marianumcloud/talk/chat/get_chat_response.dart';
import '../../../../../api/marianumcloud/talk/chat/long_poll_chat.dart';
@@ -262,7 +263,7 @@ class ChatBloc
}
void _startLongPoll(String token) {
if (!_appResumed) return;
if (!_appResumed || DemoMode.active) return;
// A load chain may finish after the user switched chats (A→B); without this
// guard the stale chain hijacks the long-poll back to A and merges A's
// messages into B's state while B never receives live updates.