feat(app): open chats from pipelines://chat/<id> notification links
The app routes pipelines://chat/<id> to that chat, alongside the existing pipelines://run/<id>, and Android registers the chat host so a tapped ntfy notification opens the app on it.
This commit is contained in:
@@ -170,4 +170,13 @@ void main() {
|
||||
// Another scheme or host is not a run link.
|
||||
expect(routeLocation(Uri.parse('pipelines://other/42')), '/42');
|
||||
});
|
||||
|
||||
test('the native chat notification link opens its chat', () async {
|
||||
const parser = AppRouteParser();
|
||||
final chat = await parser.parseRouteInformation(
|
||||
RouteInformation(uri: Uri.parse('pipelines://chat/ses_abc123')),
|
||||
);
|
||||
expect(chat, AppRoute.chatSession('ses_abc123'));
|
||||
expect(chat.chatSessionId, 'ses_abc123');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user