Chat messaging

This commit is contained in:
2024-05-26 13:39:21 +08:00
parent 5b45718ebd
commit 9cb2b9122e
20 changed files with 464 additions and 108 deletions

View File

@ -37,7 +37,7 @@ class AttachmentProvider extends GetConnect {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['paperclip'];
client.httpClient.addAuthenticator(auth.requestAuthenticator);
@ -76,7 +76,7 @@ class AttachmentProvider extends GetConnect {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['paperclip'];
client.httpClient.addAuthenticator(auth.requestAuthenticator);
@ -100,7 +100,7 @@ class AttachmentProvider extends GetConnect {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['paperclip'];
client.httpClient.addAuthenticator(auth.requestAuthenticator);

View File

@ -7,7 +7,7 @@ class ChannelProvider extends GetxController {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['messaging'];
final resp = await client.get('/api/channels/$realm/$alias');
@ -22,7 +22,7 @@ class ChannelProvider extends GetxController {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['messaging'];
client.httpClient.addAuthenticator(auth.requestAuthenticator);

View File

@ -7,7 +7,7 @@ class RealmProvider extends GetxController {
final AuthProvider auth = Get.find();
if (!await auth.isAuthorized) throw Exception('unauthorized');
final client = GetConnect();
final client = GetConnect(maxAuthRetries: 3);
client.httpClient.baseUrl = ServiceFinder.services['passport'];
client.httpClient.addAuthenticator(auth.requestAuthenticator);