[Flutter] Force a username before subscribing

This commit is contained in:
2025-12-18 15:27:27 +01:00
parent e98882a0c6
commit e15d70dd0e
7 changed files with 103 additions and 6 deletions

View File

@@ -205,7 +205,7 @@ class APIClient {
fn: User.fromJson,
authToken: auth.getToken(),
query: {
'confirm': ['true']
'confirm': ['true'],
},
);
}
@@ -230,7 +230,7 @@ class APIClient {
static Future<Client> updateClient(TokenSource auth, String clientID, {String? fcmToken, String? agentModel, String? name, String? agentVersion}) async {
return await _request(
name: 'updateClient',
method: 'PUT',
method: 'PATCH',
relURL: 'users/${auth.getUserID()}/clients/$clientID',
jsonBody: {
if (fcmToken != null) 'fcm_token': fcmToken,
@@ -259,7 +259,7 @@ class APIClient {
method: 'GET',
relURL: 'users/${auth.getUserID()}/channels',
query: {
'selector': [sel.apiKey]
'selector': [sel.apiKey],
},
fn: (json) => ChannelWithSubscription.fromJsonArray(json['channels'] as List<dynamic>),
authToken: auth.getToken(),