forked from eatvio/eatvio_app
fix(consultations): open chat via consultation chat_id
Use chat_id from the consultations payload for direct navigation and keep the chat lookup as a fallback for legacy rows without chat_id. - validate chat id in ChatRepository and make it nullable - guard repeated taps while opening chat - handle nullable chat id in ProfileCubit and EmptyChatScreen related to #1106
This commit is contained in:
@@ -75,9 +75,9 @@ void main() {
|
||||
expect(chatId, isNull);
|
||||
});
|
||||
|
||||
test('getChatIdByUserSlug - возвращает null когда чат не найден', () async {
|
||||
test('getChatIdByUserSlug - возвращает null когда чата нет', () async {
|
||||
when(() => mockChatRepository.getChatByUserSlug(any()))
|
||||
.thenAnswer((_) async => '404');
|
||||
.thenAnswer((_) async => null);
|
||||
|
||||
final chatId = await cubit.getChatIdByUserSlug('john-doe');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user