mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 09:14:06 +00:00
starting with rust rewrite
This commit is contained in:
parent
e2c616ff21
commit
6f16ee85d7
281 changed files with 26355 additions and 2784 deletions
42
lib/core/api/api_helper.dart
Normal file
42
lib/core/api/api_helper.dart
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../frb_generated.dart';
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
|
class PqcPreKeyInput {
|
||||||
|
final PlatformInt64 eccPreKeyId;
|
||||||
|
final Uint8List eccPreKey;
|
||||||
|
final PlatformInt64 kyberPreKeyId;
|
||||||
|
final Uint8List kyberPreKey;
|
||||||
|
final Uint8List kyberPreKeySignature;
|
||||||
|
|
||||||
|
const PqcPreKeyInput({
|
||||||
|
required this.eccPreKeyId,
|
||||||
|
required this.eccPreKey,
|
||||||
|
required this.kyberPreKeyId,
|
||||||
|
required this.kyberPreKey,
|
||||||
|
required this.kyberPreKeySignature,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
eccPreKeyId.hashCode ^
|
||||||
|
eccPreKey.hashCode ^
|
||||||
|
kyberPreKeyId.hashCode ^
|
||||||
|
kyberPreKey.hashCode ^
|
||||||
|
kyberPreKeySignature.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PqcPreKeyInput &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
eccPreKeyId == other.eccPreKeyId &&
|
||||||
|
eccPreKey == other.eccPreKey &&
|
||||||
|
kyberPreKeyId == other.kyberPreKeyId &&
|
||||||
|
kyberPreKey == other.kyberPreKey &&
|
||||||
|
kyberPreKeySignature == other.kyberPreKeySignature;
|
||||||
|
}
|
||||||
42
lib/core/api/operations.dart
Normal file
42
lib/core/api/operations.dart
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../frb_generated.dart';
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
|
class PqcPreKeyInput {
|
||||||
|
final PlatformInt64 eccPreKeyId;
|
||||||
|
final Uint8List eccPreKey;
|
||||||
|
final PlatformInt64 kyberPreKeyId;
|
||||||
|
final Uint8List kyberPreKey;
|
||||||
|
final Uint8List kyberPreKeySignature;
|
||||||
|
|
||||||
|
const PqcPreKeyInput({
|
||||||
|
required this.eccPreKeyId,
|
||||||
|
required this.eccPreKey,
|
||||||
|
required this.kyberPreKeyId,
|
||||||
|
required this.kyberPreKey,
|
||||||
|
required this.kyberPreKeySignature,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
eccPreKeyId.hashCode ^
|
||||||
|
eccPreKey.hashCode ^
|
||||||
|
kyberPreKeyId.hashCode ^
|
||||||
|
kyberPreKey.hashCode ^
|
||||||
|
kyberPreKeySignature.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PqcPreKeyInput &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
eccPreKeyId == other.eccPreKeyId &&
|
||||||
|
eccPreKey == other.eccPreKey &&
|
||||||
|
kyberPreKeyId == other.kyberPreKeyId &&
|
||||||
|
kyberPreKey == other.kyberPreKey &&
|
||||||
|
kyberPreKeySignature == other.kyberPreKeySignature;
|
||||||
|
}
|
||||||
28
lib/core/api/proto/server_to_client/response.dart
Normal file
28
lib/core/api/proto/server_to_client/response.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../../../frb_generated.dart';
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
|
class ProofOfWork {
|
||||||
|
final String prefix;
|
||||||
|
final PlatformInt64 difficulty;
|
||||||
|
|
||||||
|
const ProofOfWork({
|
||||||
|
required this.prefix,
|
||||||
|
required this.difficulty,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => prefix.hashCode ^ difficulty.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is ProofOfWork &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
prefix == other.prefix &&
|
||||||
|
difficulty == other.difficulty;
|
||||||
|
}
|
||||||
42
lib/core/api/server/prekeys.dart
Normal file
42
lib/core/api/server/prekeys.dart
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../../frb_generated.dart';
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
|
class PqcPreKeyInput {
|
||||||
|
final PlatformInt64 eccPreKeyId;
|
||||||
|
final Uint8List eccPreKey;
|
||||||
|
final PlatformInt64 kyberPreKeyId;
|
||||||
|
final Uint8List kyberPreKey;
|
||||||
|
final Uint8List kyberPreKeySignature;
|
||||||
|
|
||||||
|
const PqcPreKeyInput({
|
||||||
|
required this.eccPreKeyId,
|
||||||
|
required this.eccPreKey,
|
||||||
|
required this.kyberPreKeyId,
|
||||||
|
required this.kyberPreKey,
|
||||||
|
required this.kyberPreKeySignature,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
eccPreKeyId.hashCode ^
|
||||||
|
eccPreKey.hashCode ^
|
||||||
|
kyberPreKeyId.hashCode ^
|
||||||
|
kyberPreKey.hashCode ^
|
||||||
|
kyberPreKeySignature.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PqcPreKeyInput &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
eccPreKeyId == other.eccPreKeyId &&
|
||||||
|
eccPreKey == other.eccPreKey &&
|
||||||
|
kyberPreKeyId == other.kyberPreKeyId &&
|
||||||
|
kyberPreKey == other.kyberPreKey &&
|
||||||
|
kyberPreKeySignature == other.kyberPreKeySignature;
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,11 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
Future<void> initializeTwonlyFlutter({required InitConfig config}) =>
|
Future<void> initializeTwonlyFlutter({required InitConfig config}) =>
|
||||||
RustLib.instance.api.crateBridgeInitializeTwonlyFlutter(config: config);
|
RustLib.instance.api.crateBridgeInitializeTwonlyFlutter(config: config);
|
||||||
|
|
||||||
|
/// Initializes the complete Rust runtime without Flutter or callback setup.
|
||||||
|
/// Background executables should call this before using `RustApi`.
|
||||||
|
Future<void> initializeTwonlyStandalone({required InitConfig config}) =>
|
||||||
|
RustLib.instance.api.crateBridgeInitializeTwonlyStandalone(config: config);
|
||||||
|
|
||||||
class InitConfig {
|
class InitConfig {
|
||||||
final String databaseDir;
|
final String databaseDir;
|
||||||
final String dataDir;
|
final String dataDir;
|
||||||
|
|
|
||||||
489
lib/core/bridge/api.dart
Normal file
489
lib/core/bridge/api.dart
Normal file
|
|
@ -0,0 +1,489 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../api/server/prekeys.dart';
|
||||||
|
import '../frb_generated.dart';
|
||||||
|
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
||||||
|
part 'api.freezed.dart';
|
||||||
|
|
||||||
|
// These functions are ignored because they are not marked as `pub`: `from_rust_state`
|
||||||
|
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `ApiConfig`, `ServerResult`
|
||||||
|
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_fields_are_eq`, `assert_fields_are_eq`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`
|
||||||
|
// These functions are ignored (category: IgnoreBecauseOwnerTyShouldIgnore): `into_bridge`, `into_bridge`, `into_bridge`, `into_bridge`, `into_bridge`, `into_bridge`, `into_bridge`, `into_bridge`
|
||||||
|
|
||||||
|
enum ApiConnectionState {
|
||||||
|
stopped,
|
||||||
|
connecting,
|
||||||
|
connected,
|
||||||
|
authenticating,
|
||||||
|
authenticated,
|
||||||
|
reconnecting,
|
||||||
|
suspended,
|
||||||
|
permanentlyRejected,
|
||||||
|
}
|
||||||
|
|
||||||
|
class ApiEvent {
|
||||||
|
final ApiEventKind kind;
|
||||||
|
final ApiConnectionState? state;
|
||||||
|
final String? message;
|
||||||
|
|
||||||
|
const ApiEvent({
|
||||||
|
required this.kind,
|
||||||
|
this.state,
|
||||||
|
this.message,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => kind.hashCode ^ state.hashCode ^ message.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is ApiEvent &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
kind == other.kind &&
|
||||||
|
state == other.state &&
|
||||||
|
message == other.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ApiEventKind {
|
||||||
|
connectionStateChanged,
|
||||||
|
transportError,
|
||||||
|
authenticated,
|
||||||
|
planUpdated,
|
||||||
|
appOutdated,
|
||||||
|
newDeviceRegistered,
|
||||||
|
loginTokenMigrated,
|
||||||
|
}
|
||||||
|
|
||||||
|
class PreparedOutgoingMessage {
|
||||||
|
final Uint8List message;
|
||||||
|
final Uint8List? pushData;
|
||||||
|
|
||||||
|
const PreparedOutgoingMessage({
|
||||||
|
required this.message,
|
||||||
|
this.pushData,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => message.hashCode ^ pushData.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is PreparedOutgoingMessage &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
message == other.message &&
|
||||||
|
pushData == other.pushData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Flutter-facing facade for the Rust-owned API runtime.
|
||||||
|
class RustApi {
|
||||||
|
const RustApi();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> addAdditionalUser({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiAddAdditionalUser(
|
||||||
|
userId: userId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<BigInt> allocateSequence() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiAllocateSequence();
|
||||||
|
|
||||||
|
static String apiBaseUrl({required String protocol}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiApiBaseUrl(protocol: protocol);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> changeUsername({required String username}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiChangeUsername(
|
||||||
|
username: username,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> checkForDeletedUsernames() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiCheckForDeletedUsernames();
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> checkForPasswordlessNotification({
|
||||||
|
required String notificationId,
|
||||||
|
required List<int> downloadAuthToken,
|
||||||
|
required Int64List alreadyReceivedMessageIds,
|
||||||
|
}) => RustLib.instance.api
|
||||||
|
.crateBridgeApiRustApiCheckForPasswordlessNotification(
|
||||||
|
notificationId: notificationId,
|
||||||
|
downloadAuthToken: downloadAuthToken,
|
||||||
|
alreadyReceivedMessageIds: alreadyReceivedMessageIds,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> close() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiClose();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> confirmMemoriesUpload({
|
||||||
|
required String mediaId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiConfirmMemoriesUpload(
|
||||||
|
mediaId: mediaId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> connect() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiConnect();
|
||||||
|
|
||||||
|
static Future<ApiConnectionState> connectionState() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiConnectionState();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> deleteAccount() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiDeleteAccount();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> deleteMemory({required String mediaId}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiDeleteMemory(mediaId: mediaId);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> disableMemoriesBackup() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiDisableMemoriesBackup();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> downloadDone({required List<int> token}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiDownloadDone(token: token);
|
||||||
|
|
||||||
|
static Stream<ApiEvent> events() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiEvents();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> forceIpaCheck() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiForceIpaCheck();
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getMemoriesUrl({
|
||||||
|
required String mediaId,
|
||||||
|
required bool thumbnail,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiGetMemoriesUrl(
|
||||||
|
mediaId: mediaId,
|
||||||
|
thumbnail: thumbnail,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getMemoriesUsage() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiGetMemoriesUsage();
|
||||||
|
|
||||||
|
static Future<Uint8List> getPlanBalance() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiGetPlanBalance();
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getProofOfWork() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiGetProofOfWork();
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getServerKeyForPasswordlessRecovery({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
required List<int> serverKeyProtection,
|
||||||
|
Uint8List? pinUnlockToken,
|
||||||
|
Uint8List? pinProtectionKey,
|
||||||
|
String? email,
|
||||||
|
}) => RustLib.instance.api
|
||||||
|
.crateBridgeApiRustApiGetServerKeyForPasswordlessRecovery(
|
||||||
|
userId: userId,
|
||||||
|
serverKeyProtection: serverKeyProtection,
|
||||||
|
pinUnlockToken: pinUnlockToken,
|
||||||
|
pinProtectionKey: pinProtectionKey,
|
||||||
|
email: email,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getUserById({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiGetUserById(userId: userId);
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> getUserData({required String username}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiGetUserData(username: username);
|
||||||
|
|
||||||
|
static Future<ServerResultI64> getUserIdFromUsername({
|
||||||
|
required String username,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiGetUserIdFromUsername(
|
||||||
|
username: username,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<String> insertAndSendAdditionalData({
|
||||||
|
required String groupId,
|
||||||
|
required String messageType,
|
||||||
|
required List<int> additionalData,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiInsertAndSendAdditionalData(
|
||||||
|
groupId: groupId,
|
||||||
|
messageType: messageType,
|
||||||
|
additionalData: additionalData,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<String> insertAndSendAskAboutUser({
|
||||||
|
required PlatformInt64 contactId,
|
||||||
|
required PlatformInt64 askAboutUserId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiInsertAndSendAskAboutUser(
|
||||||
|
contactId: contactId,
|
||||||
|
askAboutUserId: askAboutUserId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<String> insertAndSendContactShare({
|
||||||
|
required String groupId,
|
||||||
|
required Int64List contactIds,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiInsertAndSendContactShare(
|
||||||
|
groupId: groupId,
|
||||||
|
contactIds: contactIds,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<String> insertAndSendText({
|
||||||
|
required String groupId,
|
||||||
|
required String text,
|
||||||
|
String? quoteMessageId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiInsertAndSendText(
|
||||||
|
groupId: groupId,
|
||||||
|
text: text,
|
||||||
|
quoteMessageId: quoteMessageId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<Uint8List> ipaPurchase({
|
||||||
|
required String productId,
|
||||||
|
required String source,
|
||||||
|
required String verificationData,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiIpaPurchase(
|
||||||
|
productId: productId,
|
||||||
|
source: source,
|
||||||
|
verificationData: verificationData,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<Uint8List> loadPlanBalance({required bool useCache}) => RustLib
|
||||||
|
.instance
|
||||||
|
.api
|
||||||
|
.crateBridgeApiRustApiLoadPlanBalance(useCache: useCache);
|
||||||
|
|
||||||
|
static Future<void> notifyMessagesOpened({
|
||||||
|
required PlatformInt64 contactId,
|
||||||
|
required List<String> messageIds,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiNotifyMessagesOpened(
|
||||||
|
contactId: contactId,
|
||||||
|
messageIds: messageIds,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<PreparedOutgoingMessage?> prepareQueuedMessage({
|
||||||
|
required String receiptId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiPrepareQueuedMessage(
|
||||||
|
receiptId: receiptId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultI64> register({
|
||||||
|
required String username,
|
||||||
|
required PlatformInt64 proofOfWork,
|
||||||
|
required String langCode,
|
||||||
|
required bool isIos,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiRegister(
|
||||||
|
username: username,
|
||||||
|
proofOfWork: proofOfWork,
|
||||||
|
langCode: langCode,
|
||||||
|
isIos: isIos,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> registerPasswordlessNotification({
|
||||||
|
required String notificationId,
|
||||||
|
required List<int> downloadAuthToken,
|
||||||
|
required String langCode,
|
||||||
|
String? googleFcm,
|
||||||
|
}) => RustLib.instance.api
|
||||||
|
.crateBridgeApiRustApiRegisterPasswordlessNotification(
|
||||||
|
notificationId: notificationId,
|
||||||
|
downloadAuthToken: downloadAuthToken,
|
||||||
|
langCode: langCode,
|
||||||
|
googleFcm: googleFcm,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> registerPasswordlessRecovery({
|
||||||
|
required List<int> encryptedServerKey,
|
||||||
|
Uint8List? pinUnlockToken,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiRegisterPasswordlessRecovery(
|
||||||
|
encryptedServerKey: encryptedServerKey,
|
||||||
|
pinUnlockToken: pinUnlockToken,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// Reloads identity and authentication settings from Rust-owned storage.
|
||||||
|
/// No configuration values are accepted from the caller.
|
||||||
|
static Future<void> reloadConfiguration() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiReloadConfiguration();
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> removeAdditionalUser({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiRemoveAdditionalUser(
|
||||||
|
userId: userId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> reportUser({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
required String reason,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiReportUser(
|
||||||
|
userId: userId,
|
||||||
|
reason: reason,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// Sends a protobuf ClientToServer envelope. Rust assigns the sequence ID
|
||||||
|
/// and resolves this future with the matching ServerToClient response.
|
||||||
|
static Future<Uint8List> requestBinary({required List<int> bytes}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiRequestBinary(bytes: bytes);
|
||||||
|
|
||||||
|
static Future<void> requestContactByUsername({required String username}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiRequestContactByUsername(
|
||||||
|
username: username,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultVecU8> requestMemoriesUpload({
|
||||||
|
required PlatformInt64 size,
|
||||||
|
required PlatformInt64 originalDate,
|
||||||
|
required String mediaId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiRequestMemoriesUpload(
|
||||||
|
size: size,
|
||||||
|
originalDate: originalDate,
|
||||||
|
mediaId: mediaId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> retransmitAllMessages() =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiRetransmitAllMessages();
|
||||||
|
|
||||||
|
static Future<void> sendBinary({required List<int> bytes}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiSendBinary(bytes: bytes);
|
||||||
|
|
||||||
|
static Future<void> sendContactProfile({required PlatformInt64 contactId}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiSendContactProfile(
|
||||||
|
contactId: contactId,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<PreparedOutgoingMessage?> sendEncryptedContent({
|
||||||
|
required PlatformInt64 contactId,
|
||||||
|
required List<int> content,
|
||||||
|
String? messageId,
|
||||||
|
required bool onlySendIfNoReceiptsAreOpen,
|
||||||
|
required bool onlyReturnEncryptedData,
|
||||||
|
required bool blocking,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiSendEncryptedContent(
|
||||||
|
contactId: contactId,
|
||||||
|
content: content,
|
||||||
|
messageId: messageId,
|
||||||
|
onlySendIfNoReceiptsAreOpen: onlySendIfNoReceiptsAreOpen,
|
||||||
|
onlyReturnEncryptedData: onlyReturnEncryptedData,
|
||||||
|
blocking: blocking,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> sendEncryptedContentToGroup({
|
||||||
|
required String groupId,
|
||||||
|
required List<int> content,
|
||||||
|
String? messageId,
|
||||||
|
required bool onlySendIfNoReceiptsAreOpen,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiSendEncryptedContentToGroup(
|
||||||
|
groupId: groupId,
|
||||||
|
content: content,
|
||||||
|
messageId: messageId,
|
||||||
|
onlySendIfNoReceiptsAreOpen: onlySendIfNoReceiptsAreOpen,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> sendQueuedMessage({required String receiptId}) => RustLib
|
||||||
|
.instance
|
||||||
|
.api
|
||||||
|
.crateBridgeApiRustApiSendQueuedMessage(receiptId: receiptId);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> sendTextMessage({
|
||||||
|
required PlatformInt64 userId,
|
||||||
|
required List<int> body,
|
||||||
|
Uint8List? pushData,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiSendTextMessage(
|
||||||
|
userId: userId,
|
||||||
|
body: body,
|
||||||
|
pushData: pushData,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> sendTyping({
|
||||||
|
required String groupId,
|
||||||
|
required bool isTyping,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiSendTyping(
|
||||||
|
groupId: groupId,
|
||||||
|
isTyping: isTyping,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<void> setBackground({required bool inBackground}) => RustLib
|
||||||
|
.instance
|
||||||
|
.api
|
||||||
|
.crateBridgeApiRustApiSetBackground(inBackground: inBackground);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> setLoginToken({required List<int> token}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiSetLoginToken(token: token);
|
||||||
|
|
||||||
|
static Future<void> setNetworkAvailable({required bool available}) => RustLib
|
||||||
|
.instance
|
||||||
|
.api
|
||||||
|
.crateBridgeApiRustApiSetNetworkAvailable(available: available);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> submitRecoveryShare({
|
||||||
|
required String notificationId,
|
||||||
|
required List<int> encryptedMessage,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiSubmitRecoveryShare(
|
||||||
|
notificationId: notificationId,
|
||||||
|
encryptedMessage: encryptedMessage,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<ServerResultEmpty> updateFcmToken({required String token}) =>
|
||||||
|
RustLib.instance.api.crateBridgeApiRustApiUpdateFcmToken(token: token);
|
||||||
|
|
||||||
|
static Future<Uint8List> updateSignedPreKey({
|
||||||
|
required PlatformInt64 id,
|
||||||
|
required List<int> key,
|
||||||
|
required List<int> signature,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiUpdateSignedPreKey(
|
||||||
|
id: id,
|
||||||
|
key: key,
|
||||||
|
signature: signature,
|
||||||
|
);
|
||||||
|
|
||||||
|
static Future<Uint8List> uploadPqcPreKeys({
|
||||||
|
required PlatformInt64 eccSignedPrekeyId,
|
||||||
|
required List<int> eccSignedPrekey,
|
||||||
|
required List<int> eccSignedPrekeySignature,
|
||||||
|
required PlatformInt64 kyberSignedPrekeyId,
|
||||||
|
required List<int> kyberSignedPrekey,
|
||||||
|
required List<int> kyberSignedPrekeySignature,
|
||||||
|
required List<PqcPreKeyInput> prekeys,
|
||||||
|
}) => RustLib.instance.api.crateBridgeApiRustApiUploadPqcPreKeys(
|
||||||
|
eccSignedPrekeyId: eccSignedPrekeyId,
|
||||||
|
eccSignedPrekey: eccSignedPrekey,
|
||||||
|
eccSignedPrekeySignature: eccSignedPrekeySignature,
|
||||||
|
kyberSignedPrekeyId: kyberSignedPrekeyId,
|
||||||
|
kyberSignedPrekey: kyberSignedPrekey,
|
||||||
|
kyberSignedPrekeySignature: kyberSignedPrekeySignature,
|
||||||
|
prekeys: prekeys,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is RustApi && runtimeType == other.runtimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class ServerResultEmpty with _$ServerResultEmpty {
|
||||||
|
const ServerResultEmpty._();
|
||||||
|
|
||||||
|
const factory ServerResultEmpty.ok() = ServerResultEmpty_Ok;
|
||||||
|
const factory ServerResultEmpty.errorCode(
|
||||||
|
int field0,
|
||||||
|
) = ServerResultEmpty_ErrorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class ServerResultI64 with _$ServerResultI64 {
|
||||||
|
const ServerResultI64._();
|
||||||
|
|
||||||
|
const factory ServerResultI64.ok(
|
||||||
|
PlatformInt64 field0,
|
||||||
|
) = ServerResultI64_Ok;
|
||||||
|
const factory ServerResultI64.errorCode(
|
||||||
|
int field0,
|
||||||
|
) = ServerResultI64_ErrorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
sealed class ServerResultVecU8 with _$ServerResultVecU8 {
|
||||||
|
const ServerResultVecU8._();
|
||||||
|
|
||||||
|
const factory ServerResultVecU8.ok(
|
||||||
|
Uint8List field0,
|
||||||
|
) = ServerResultVecU8_Ok;
|
||||||
|
const factory ServerResultVecU8.errorCode(
|
||||||
|
int field0,
|
||||||
|
) = ServerResultVecU8_ErrorCode;
|
||||||
|
}
|
||||||
888
lib/core/bridge/api.freezed.dart
Normal file
888
lib/core/bridge/api.freezed.dart
Normal file
|
|
@ -0,0 +1,888 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
|
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
||||||
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||||
|
|
||||||
|
part of 'api.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// FreezedGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// dart format off
|
||||||
|
T _$identity<T>(T value) => value;
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ServerResultEmpty {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultEmpty);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultEmpty()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $ServerResultEmptyCopyWith<$Res> {
|
||||||
|
$ServerResultEmptyCopyWith(ServerResultEmpty _, $Res Function(ServerResultEmpty) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ServerResultEmpty].
|
||||||
|
extension ServerResultEmptyPatterns on ServerResultEmpty {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( ServerResultEmpty_Ok value)? ok,TResult Function( ServerResultEmpty_ErrorCode value)? errorCode,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultEmpty_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( ServerResultEmpty_Ok value) ok,required TResult Function( ServerResultEmpty_ErrorCode value) errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok():
|
||||||
|
return ok(_that);case ServerResultEmpty_ErrorCode():
|
||||||
|
return errorCode(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( ServerResultEmpty_Ok value)? ok,TResult? Function( ServerResultEmpty_ErrorCode value)? errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultEmpty_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? ok,TResult Function( int field0)? errorCode,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok() when ok != null:
|
||||||
|
return ok();case ServerResultEmpty_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() ok,required TResult Function( int field0) errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok():
|
||||||
|
return ok();case ServerResultEmpty_ErrorCode():
|
||||||
|
return errorCode(_that.field0);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? ok,TResult? Function( int field0)? errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultEmpty_Ok() when ok != null:
|
||||||
|
return ok();case ServerResultEmpty_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultEmpty_Ok extends ServerResultEmpty {
|
||||||
|
const ServerResultEmpty_Ok(): super._();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultEmpty_Ok);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => runtimeType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultEmpty.ok()';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultEmpty_ErrorCode extends ServerResultEmpty {
|
||||||
|
const ServerResultEmpty_ErrorCode(this.field0): super._();
|
||||||
|
|
||||||
|
|
||||||
|
final int field0;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultEmpty
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultEmpty_ErrorCodeCopyWith<ServerResultEmpty_ErrorCode> get copyWith => _$ServerResultEmpty_ErrorCodeCopyWithImpl<ServerResultEmpty_ErrorCode>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultEmpty_ErrorCode&&(identical(other.field0, field0) || other.field0 == field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,field0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultEmpty.errorCode(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultEmpty_ErrorCodeCopyWith<$Res> implements $ServerResultEmptyCopyWith<$Res> {
|
||||||
|
factory $ServerResultEmpty_ErrorCodeCopyWith(ServerResultEmpty_ErrorCode value, $Res Function(ServerResultEmpty_ErrorCode) _then) = _$ServerResultEmpty_ErrorCodeCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
int field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultEmpty_ErrorCodeCopyWithImpl<$Res>
|
||||||
|
implements $ServerResultEmpty_ErrorCodeCopyWith<$Res> {
|
||||||
|
_$ServerResultEmpty_ErrorCodeCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultEmpty_ErrorCode _self;
|
||||||
|
final $Res Function(ServerResultEmpty_ErrorCode) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultEmpty
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(ServerResultEmpty_ErrorCode(
|
||||||
|
null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ServerResultI64 {
|
||||||
|
|
||||||
|
int get field0;
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultI64CopyWith<ServerResultI64> get copyWith => _$ServerResultI64CopyWithImpl<ServerResultI64>(this as ServerResultI64, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultI64&&(identical(other.field0, field0) || other.field0 == field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,field0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultI64(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultI64CopyWith<$Res> {
|
||||||
|
factory $ServerResultI64CopyWith(ServerResultI64 value, $Res Function(ServerResultI64) _then) = _$ServerResultI64CopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
int field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultI64CopyWithImpl<$Res>
|
||||||
|
implements $ServerResultI64CopyWith<$Res> {
|
||||||
|
_$ServerResultI64CopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultI64 _self;
|
||||||
|
final $Res Function(ServerResultI64) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
field0: null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ServerResultI64].
|
||||||
|
extension ServerResultI64Patterns on ServerResultI64 {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( ServerResultI64_Ok value)? ok,TResult Function( ServerResultI64_ErrorCode value)? errorCode,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultI64_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( ServerResultI64_Ok value) ok,required TResult Function( ServerResultI64_ErrorCode value) errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok():
|
||||||
|
return ok(_that);case ServerResultI64_ErrorCode():
|
||||||
|
return errorCode(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( ServerResultI64_Ok value)? ok,TResult? Function( ServerResultI64_ErrorCode value)? errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultI64_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( PlatformInt64 field0)? ok,TResult Function( int field0)? errorCode,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok() when ok != null:
|
||||||
|
return ok(_that.field0);case ServerResultI64_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( PlatformInt64 field0) ok,required TResult Function( int field0) errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok():
|
||||||
|
return ok(_that.field0);case ServerResultI64_ErrorCode():
|
||||||
|
return errorCode(_that.field0);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( PlatformInt64 field0)? ok,TResult? Function( int field0)? errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultI64_Ok() when ok != null:
|
||||||
|
return ok(_that.field0);case ServerResultI64_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultI64_Ok extends ServerResultI64 {
|
||||||
|
const ServerResultI64_Ok(this.field0): super._();
|
||||||
|
|
||||||
|
|
||||||
|
@override final PlatformInt64 field0;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultI64_OkCopyWith<ServerResultI64_Ok> get copyWith => _$ServerResultI64_OkCopyWithImpl<ServerResultI64_Ok>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultI64_Ok&&(identical(other.field0, field0) || other.field0 == field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,field0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultI64.ok(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultI64_OkCopyWith<$Res> implements $ServerResultI64CopyWith<$Res> {
|
||||||
|
factory $ServerResultI64_OkCopyWith(ServerResultI64_Ok value, $Res Function(ServerResultI64_Ok) _then) = _$ServerResultI64_OkCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
PlatformInt64 field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultI64_OkCopyWithImpl<$Res>
|
||||||
|
implements $ServerResultI64_OkCopyWith<$Res> {
|
||||||
|
_$ServerResultI64_OkCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultI64_Ok _self;
|
||||||
|
final $Res Function(ServerResultI64_Ok) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(ServerResultI64_Ok(
|
||||||
|
null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as PlatformInt64,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultI64_ErrorCode extends ServerResultI64 {
|
||||||
|
const ServerResultI64_ErrorCode(this.field0): super._();
|
||||||
|
|
||||||
|
|
||||||
|
@override final int field0;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultI64_ErrorCodeCopyWith<ServerResultI64_ErrorCode> get copyWith => _$ServerResultI64_ErrorCodeCopyWithImpl<ServerResultI64_ErrorCode>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultI64_ErrorCode&&(identical(other.field0, field0) || other.field0 == field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,field0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultI64.errorCode(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultI64_ErrorCodeCopyWith<$Res> implements $ServerResultI64CopyWith<$Res> {
|
||||||
|
factory $ServerResultI64_ErrorCodeCopyWith(ServerResultI64_ErrorCode value, $Res Function(ServerResultI64_ErrorCode) _then) = _$ServerResultI64_ErrorCodeCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
int field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultI64_ErrorCodeCopyWithImpl<$Res>
|
||||||
|
implements $ServerResultI64_ErrorCodeCopyWith<$Res> {
|
||||||
|
_$ServerResultI64_ErrorCodeCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultI64_ErrorCode _self;
|
||||||
|
final $Res Function(ServerResultI64_ErrorCode) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultI64
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(ServerResultI64_ErrorCode(
|
||||||
|
null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$ServerResultVecU8 {
|
||||||
|
|
||||||
|
Object get field0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultVecU8&&const DeepCollectionEquality().equals(other.field0, field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(field0));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultVecU8(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
class $ServerResultVecU8CopyWith<$Res> {
|
||||||
|
$ServerResultVecU8CopyWith(ServerResultVecU8 _, $Res Function(ServerResultVecU8) __);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Adds pattern-matching-related methods to [ServerResultVecU8].
|
||||||
|
extension ServerResultVecU8Patterns on ServerResultVecU8 {
|
||||||
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( ServerResultVecU8_Ok value)? ok,TResult Function( ServerResultVecU8_ErrorCode value)? errorCode,required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultVecU8_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// Callbacks receives the raw object, upcasted.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case final Subclass2 value:
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( ServerResultVecU8_Ok value) ok,required TResult Function( ServerResultVecU8_ErrorCode value) errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok():
|
||||||
|
return ok(_that);case ServerResultVecU8_ErrorCode():
|
||||||
|
return errorCode(_that);}
|
||||||
|
}
|
||||||
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( ServerResultVecU8_Ok value)? ok,TResult? Function( ServerResultVecU8_ErrorCode value)? errorCode,}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok() when ok != null:
|
||||||
|
return ok(_that);case ServerResultVecU8_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to an `orElse` callback.
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( Uint8List field0)? ok,TResult Function( int field0)? errorCode,required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok() when ok != null:
|
||||||
|
return ok(_that.field0);case ServerResultVecU8_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return orElse();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// A `switch`-like method, using callbacks.
|
||||||
|
///
|
||||||
|
/// As opposed to `map`, this offers destructuring.
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case Subclass2(:final field2):
|
||||||
|
/// return ...;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( Uint8List field0) ok,required TResult Function( int field0) errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok():
|
||||||
|
return ok(_that.field0);case ServerResultVecU8_ErrorCode():
|
||||||
|
return errorCode(_that.field0);}
|
||||||
|
}
|
||||||
|
/// A variant of `when` that fallback to returning `null`
|
||||||
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case Subclass(:final field):
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return null;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( Uint8List field0)? ok,TResult? Function( int field0)? errorCode,}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case ServerResultVecU8_Ok() when ok != null:
|
||||||
|
return ok(_that.field0);case ServerResultVecU8_ErrorCode() when errorCode != null:
|
||||||
|
return errorCode(_that.field0);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultVecU8_Ok extends ServerResultVecU8 {
|
||||||
|
const ServerResultVecU8_Ok(this.field0): super._();
|
||||||
|
|
||||||
|
|
||||||
|
@override final Uint8List field0;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultVecU8
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultVecU8_OkCopyWith<ServerResultVecU8_Ok> get copyWith => _$ServerResultVecU8_OkCopyWithImpl<ServerResultVecU8_Ok>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultVecU8_Ok&&const DeepCollectionEquality().equals(other.field0, field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(field0));
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultVecU8.ok(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultVecU8_OkCopyWith<$Res> implements $ServerResultVecU8CopyWith<$Res> {
|
||||||
|
factory $ServerResultVecU8_OkCopyWith(ServerResultVecU8_Ok value, $Res Function(ServerResultVecU8_Ok) _then) = _$ServerResultVecU8_OkCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
Uint8List field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultVecU8_OkCopyWithImpl<$Res>
|
||||||
|
implements $ServerResultVecU8_OkCopyWith<$Res> {
|
||||||
|
_$ServerResultVecU8_OkCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultVecU8_Ok _self;
|
||||||
|
final $Res Function(ServerResultVecU8_Ok) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultVecU8
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(ServerResultVecU8_Ok(
|
||||||
|
null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as Uint8List,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
|
||||||
|
|
||||||
|
class ServerResultVecU8_ErrorCode extends ServerResultVecU8 {
|
||||||
|
const ServerResultVecU8_ErrorCode(this.field0): super._();
|
||||||
|
|
||||||
|
|
||||||
|
@override final int field0;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultVecU8
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ServerResultVecU8_ErrorCodeCopyWith<ServerResultVecU8_ErrorCode> get copyWith => _$ServerResultVecU8_ErrorCodeCopyWithImpl<ServerResultVecU8_ErrorCode>(this, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ServerResultVecU8_ErrorCode&&(identical(other.field0, field0) || other.field0 == field0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,field0);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ServerResultVecU8.errorCode(field0: $field0)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $ServerResultVecU8_ErrorCodeCopyWith<$Res> implements $ServerResultVecU8CopyWith<$Res> {
|
||||||
|
factory $ServerResultVecU8_ErrorCodeCopyWith(ServerResultVecU8_ErrorCode value, $Res Function(ServerResultVecU8_ErrorCode) _then) = _$ServerResultVecU8_ErrorCodeCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
int field0
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$ServerResultVecU8_ErrorCodeCopyWithImpl<$Res>
|
||||||
|
implements $ServerResultVecU8_ErrorCodeCopyWith<$Res> {
|
||||||
|
_$ServerResultVecU8_ErrorCodeCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final ServerResultVecU8_ErrorCode _self;
|
||||||
|
final $Res Function(ServerResultVecU8_ErrorCode) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ServerResultVecU8
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') $Res call({Object? field0 = null,}) {
|
||||||
|
return _then(ServerResultVecU8_ErrorCode(
|
||||||
|
null == field0 ? _self.field0 : field0 // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
|
|
@ -4,16 +4,125 @@
|
||||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
import '../frb_generated.dart';
|
import '../frb_generated.dart';
|
||||||
|
|
||||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
// These functions are ignored because they are not marked as `pub`: `get_callbacks`
|
// These functions are ignored because they are not marked as `pub`: `get_callbacks`
|
||||||
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `FlutterCallbacks`, `Logging`
|
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `Api`, `FlutterCallbacks`, `LegacySignal`, `Logging`
|
||||||
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`
|
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `fmt`, `fmt`, `fmt`
|
||||||
|
|
||||||
Future<void> initFlutterCallbacks({
|
Future<void> initFlutterCallbacks({
|
||||||
required int callbackId,
|
required int callbackId,
|
||||||
required FutureOr<RustStreamSink<String>> Function() loggingGetStreamSink,
|
required FutureOr<RustStreamSink<String>> Function() loggingGetStreamSink,
|
||||||
|
required FutureOr<LegacySignalDecryptResult> Function(
|
||||||
|
PlatformInt64,
|
||||||
|
Uint8List,
|
||||||
|
int,
|
||||||
|
)
|
||||||
|
legacySignalDecrypt,
|
||||||
|
required FutureOr<LegacySignalEncryptResult?> Function(
|
||||||
|
PlatformInt64,
|
||||||
|
Uint8List,
|
||||||
|
)
|
||||||
|
legacySignalEncrypt,
|
||||||
|
required FutureOr<List<LegacySignalPreKey>> Function()
|
||||||
|
legacySignalGeneratePrekeys,
|
||||||
|
required FutureOr<void> Function(PlatformInt64) apiResyncSignalSession,
|
||||||
|
required FutureOr<void> Function(PlatformInt64) apiPushKeyRequested,
|
||||||
|
required FutureOr<void> Function(PlatformInt64, String, String)
|
||||||
|
apiGroupMembershipError,
|
||||||
|
required FutureOr<void> Function(String, String, PlatformInt64, String)
|
||||||
|
apiMediaAction,
|
||||||
|
required FutureOr<void> Function(PlatformInt64, Uint8List)
|
||||||
|
apiVerificationProof,
|
||||||
|
required FutureOr<Uint8List?> Function(PlatformInt64, String?, Uint8List, int)
|
||||||
|
apiCreatePushData,
|
||||||
|
required FutureOr<void> Function(PlatformInt64) apiCreatePushAvatars,
|
||||||
|
required FutureOr<void> Function() apiRecoveryChanged,
|
||||||
|
required FutureOr<void> Function(String, PlatformInt64) apiMediaReceived,
|
||||||
|
required FutureOr<void> Function(String, bool) apiGroupStateRefresh,
|
||||||
}) => RustLib.instance.api.crateBridgeCallbacksInitFlutterCallbacks(
|
}) => RustLib.instance.api.crateBridgeCallbacksInitFlutterCallbacks(
|
||||||
callbackId: callbackId,
|
callbackId: callbackId,
|
||||||
loggingGetStreamSink: loggingGetStreamSink,
|
loggingGetStreamSink: loggingGetStreamSink,
|
||||||
|
legacySignalDecrypt: legacySignalDecrypt,
|
||||||
|
legacySignalEncrypt: legacySignalEncrypt,
|
||||||
|
legacySignalGeneratePrekeys: legacySignalGeneratePrekeys,
|
||||||
|
apiResyncSignalSession: apiResyncSignalSession,
|
||||||
|
apiPushKeyRequested: apiPushKeyRequested,
|
||||||
|
apiGroupMembershipError: apiGroupMembershipError,
|
||||||
|
apiMediaAction: apiMediaAction,
|
||||||
|
apiVerificationProof: apiVerificationProof,
|
||||||
|
apiCreatePushData: apiCreatePushData,
|
||||||
|
apiCreatePushAvatars: apiCreatePushAvatars,
|
||||||
|
apiRecoveryChanged: apiRecoveryChanged,
|
||||||
|
apiMediaReceived: apiMediaReceived,
|
||||||
|
apiGroupStateRefresh: apiGroupStateRefresh,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
class LegacySignalDecryptResult {
|
||||||
|
/// Serialized `EncryptedContent` when legacy Signal decryption succeeded.
|
||||||
|
final Uint8List? plaintext;
|
||||||
|
|
||||||
|
/// Serialized protobuf enum value for `DecryptionErrorMessage.Type`.
|
||||||
|
final int? decryptionErrorType;
|
||||||
|
|
||||||
|
const LegacySignalDecryptResult({
|
||||||
|
this.plaintext,
|
||||||
|
this.decryptionErrorType,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => plaintext.hashCode ^ decryptionErrorType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is LegacySignalDecryptResult &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
plaintext == other.plaintext &&
|
||||||
|
decryptionErrorType == other.decryptionErrorType;
|
||||||
|
}
|
||||||
|
|
||||||
|
class LegacySignalEncryptResult {
|
||||||
|
final Uint8List ciphertext;
|
||||||
|
|
||||||
|
/// `Message.Type.CIPHERTEXT` or `Message.Type.PREKEY_BUNDLE`.
|
||||||
|
final int messageType;
|
||||||
|
|
||||||
|
const LegacySignalEncryptResult({
|
||||||
|
required this.ciphertext,
|
||||||
|
required this.messageType,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => ciphertext.hashCode ^ messageType.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is LegacySignalEncryptResult &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
ciphertext == other.ciphertext &&
|
||||||
|
messageType == other.messageType;
|
||||||
|
}
|
||||||
|
|
||||||
|
class LegacySignalPreKey {
|
||||||
|
final PlatformInt64 id;
|
||||||
|
final Uint8List publicKey;
|
||||||
|
|
||||||
|
const LegacySignalPreKey({
|
||||||
|
required this.id,
|
||||||
|
required this.publicKey,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => id.hashCode ^ publicKey.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is LegacySignalPreKey &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
id == other.id &&
|
||||||
|
publicKey == other.publicKey;
|
||||||
|
}
|
||||||
|
|
|
||||||
79
lib/core/bridge/groups.dart
Normal file
79
lib/core/bridge/groups.dart
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
// This file is automatically generated, so please do not edit it.
|
||||||
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
||||||
|
|
||||||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||||
|
|
||||||
|
import '../frb_generated.dart';
|
||||||
|
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
|
||||||
|
Future<bool> createNewGroup({
|
||||||
|
required String groupName,
|
||||||
|
required Int64List memberIds,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsCreateNewGroup(
|
||||||
|
groupName: groupName,
|
||||||
|
memberIds: memberIds,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> fetchGroupState({required String groupId}) =>
|
||||||
|
RustLib.instance.api.crateBridgeGroupsFetchGroupState(groupId: groupId);
|
||||||
|
|
||||||
|
Future<bool> addHiddenContact({required PlatformInt64 contactId}) => RustLib
|
||||||
|
.instance
|
||||||
|
.api
|
||||||
|
.crateBridgeGroupsAddHiddenContact(contactId: contactId);
|
||||||
|
|
||||||
|
Future<void> fetchGroupStatesForUnjoinedGroups() =>
|
||||||
|
RustLib.instance.api.crateBridgeGroupsFetchGroupStatesForUnjoinedGroups();
|
||||||
|
|
||||||
|
Future<void> fetchMissingGroupPublicKeys() =>
|
||||||
|
RustLib.instance.api.crateBridgeGroupsFetchMissingGroupPublicKeys();
|
||||||
|
|
||||||
|
Future<bool> manageAdminState({
|
||||||
|
required String groupId,
|
||||||
|
required List<int> groupPublicKey,
|
||||||
|
required PlatformInt64 contactId,
|
||||||
|
required bool remove,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsManageAdminState(
|
||||||
|
groupId: groupId,
|
||||||
|
groupPublicKey: groupPublicKey,
|
||||||
|
contactId: contactId,
|
||||||
|
remove: remove,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> updateGroupName({
|
||||||
|
required String groupId,
|
||||||
|
required String groupName,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsUpdateGroupName(
|
||||||
|
groupId: groupId,
|
||||||
|
groupName: groupName,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> updateChatDeletionTime({
|
||||||
|
required String groupId,
|
||||||
|
required PlatformInt64 deleteMessagesAfterMilliseconds,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsUpdateChatDeletionTime(
|
||||||
|
groupId: groupId,
|
||||||
|
deleteMessagesAfterMilliseconds: deleteMessagesAfterMilliseconds,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> addNewGroupMembers({
|
||||||
|
required String groupId,
|
||||||
|
required Int64List memberIds,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsAddNewGroupMembers(
|
||||||
|
groupId: groupId,
|
||||||
|
memberIds: memberIds,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> removeMemberFromGroup({
|
||||||
|
required String groupId,
|
||||||
|
required List<int> groupPublicKey,
|
||||||
|
required PlatformInt64 contactId,
|
||||||
|
}) => RustLib.instance.api.crateBridgeGroupsRemoveMemberFromGroup(
|
||||||
|
groupId: groupId,
|
||||||
|
groupPublicKey: groupPublicKey,
|
||||||
|
contactId: contactId,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<bool> leaveGroup({required String groupId}) =>
|
||||||
|
RustLib.instance.api.crateBridgeGroupsLeaveGroup(groupId: groupId);
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
|
||||||
|
|
||||||
|
import 'api/server/prekeys.dart';
|
||||||
import 'bridge.dart';
|
import 'bridge.dart';
|
||||||
|
import 'bridge/api.dart';
|
||||||
import 'bridge/callbacks.dart';
|
import 'bridge/callbacks.dart';
|
||||||
|
import 'bridge/groups.dart';
|
||||||
import 'bridge/wrapper.dart';
|
import 'bridge/wrapper.dart';
|
||||||
import 'bridge/wrapper/app_database.dart';
|
import 'bridge/wrapper/app_database.dart';
|
||||||
import 'bridge/wrapper/backup.dart';
|
import 'bridge/wrapper/backup.dart';
|
||||||
|
|
@ -32,12 +35,70 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, String, PlatformInt64, String)
|
||||||
|
dco_decode_DartFn_Inputs_String_String_i_64_String_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, bool)
|
||||||
|
dco_decode_DartFn_Inputs_String_bool_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, PlatformInt64)
|
||||||
|
dco_decode_DartFn_Inputs_String_i_64_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
FutureOr<RustStreamSink<String>> Function()
|
FutureOr<RustStreamSink<String>> Function()
|
||||||
dco_decode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
dco_decode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<List<LegacySignalPreKey>> Function()
|
||||||
|
dco_decode_DartFn_Inputs__Output_list_legacy_signal_pre_key_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function()
|
||||||
|
dco_decode_DartFn_Inputs__Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64, String, String)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_String_String_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<LegacySignalEncryptResult?> Function(PlatformInt64, Uint8List)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_opt_box_autoadd_legacy_signal_encrypt_result_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64, Uint8List)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<LegacySignalDecryptResult> Function(PlatformInt64, Uint8List, int)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_i_32_Output_legacy_signal_decrypt_result_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<Uint8List?> Function(PlatformInt64, String?, Uint8List, int)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_opt_String_list_prim_u_8_strict_i_32_Output_opt_list_prim_u_8_strict_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Object dco_decode_DartOpaque(dynamic raw);
|
Object dco_decode_DartOpaque(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -49,15 +110,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustStreamSink<String> dco_decode_StreamSink_String_Sse(dynamic raw);
|
RustStreamSink<String> dco_decode_StreamSink_String_Sse(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustStreamSink<ApiEvent> dco_decode_StreamSink_api_event_Sse(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
String dco_decode_String(dynamic raw);
|
String dco_decode_String(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState dco_decode_api_connection_state(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEvent dco_decode_api_event(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEventKind dco_decode_api_event_kind(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys dco_decode_backup_password_keys(dynamic raw);
|
BackupPasswordKeys dco_decode_backup_password_keys(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
bool dco_decode_bool(dynamic raw);
|
bool dco_decode_bool(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState dco_decode_box_autoadd_api_connection_state(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys dco_decode_box_autoadd_backup_password_keys(dynamic raw);
|
BackupPasswordKeys dco_decode_box_autoadd_backup_password_keys(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -67,12 +143,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw);
|
FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int dco_decode_box_autoadd_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);
|
PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
InitConfig dco_decode_box_autoadd_init_config(dynamic raw);
|
InitConfig dco_decode_box_autoadd_init_config(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult dco_decode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage dco_decode_box_autoadd_prepared_outgoing_message(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_box_autoadd_u_32(dynamic raw);
|
int dco_decode_box_autoadd_u_32(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -88,6 +177,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw);
|
FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int dco_decode_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 dco_decode_i_64(dynamic raw);
|
PlatformInt64 dco_decode_i_64(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -100,6 +192,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
LegacyMigrationReport dco_decode_legacy_migration_report(dynamic raw);
|
LegacyMigrationReport dco_decode_legacy_migration_report(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalDecryptResult dco_decode_legacy_signal_decrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult dco_decode_legacy_signal_encrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalPreKey dco_decode_legacy_signal_pre_key(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
LegacyTableMigrationCount dco_decode_legacy_table_migration_count(
|
LegacyTableMigrationCount dco_decode_legacy_table_migration_count(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -111,6 +216,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
List<FrbPqcPreKey> dco_decode_list_frb_pqc_pre_key(dynamic raw);
|
List<FrbPqcPreKey> dco_decode_list_frb_pqc_pre_key(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<LegacySignalPreKey> dco_decode_list_legacy_signal_pre_key(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<LegacyTableMigrationCount> dco_decode_list_legacy_table_migration_count(
|
List<LegacyTableMigrationCount> dco_decode_list_legacy_table_migration_count(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -119,6 +227,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
List<Uint8List> dco_decode_list_list_prim_u_8_strict(dynamic raw);
|
List<Uint8List> dco_decode_list_list_prim_u_8_strict(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<PqcPreKeyInput> dco_decode_list_pqc_pre_key_input(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
Int64List dco_decode_list_prim_i_64_strict(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<int> dco_decode_list_prim_u_8_loose(dynamic raw);
|
List<int> dco_decode_list_prim_u_8_loose(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -138,18 +252,41 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
String? dco_decode_opt_String(dynamic raw);
|
String? dco_decode_opt_String(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState? dco_decode_opt_box_autoadd_api_connection_state(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
double? dco_decode_opt_box_autoadd_f_64(dynamic raw);
|
double? dco_decode_opt_box_autoadd_f_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int? dco_decode_opt_box_autoadd_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);
|
PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult?
|
||||||
|
dco_decode_opt_box_autoadd_legacy_signal_encrypt_result(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage? dco_decode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int? dco_decode_opt_box_autoadd_u_32(dynamic raw);
|
int? dco_decode_opt_box_autoadd_u_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw);
|
Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PqcPreKeyInput dco_decode_pqc_pre_key_input(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage dco_decode_prepared_outgoing_message(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
(PlatformInt64, Uint8List) dco_decode_record_i_64_list_prim_u_8_strict(
|
(PlatformInt64, Uint8List) dco_decode_record_i_64_list_prim_u_8_strict(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -163,6 +300,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
(String, String) dco_decode_record_string_string(dynamic raw);
|
(String, String) dco_decode_record_string_string(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustApi dco_decode_rust_api(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
RustAppDatabase dco_decode_rust_app_database(dynamic raw);
|
RustAppDatabase dco_decode_rust_app_database(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -181,6 +321,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustUtils dco_decode_rust_utils(dynamic raw);
|
RustUtils dco_decode_rust_utils(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultEmpty dco_decode_server_result_empty(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultI64 dco_decode_server_result_i_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultVecU8 dco_decode_server_result_vec_u_8(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
SqlExecutionResult dco_decode_sql_execution_result(dynamic raw);
|
SqlExecutionResult dco_decode_sql_execution_result(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -196,6 +345,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_u_32(dynamic raw);
|
int dco_decode_u_32(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
BigInt dco_decode_u_64(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_u_8(dynamic raw);
|
int dco_decode_u_8(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -224,9 +376,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustStreamSink<ApiEvent> sse_decode_StreamSink_api_event_Sse(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
String sse_decode_String(SseDeserializer deserializer);
|
String sse_decode_String(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState sse_decode_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEvent sse_decode_api_event(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEventKind sse_decode_api_event_kind(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys sse_decode_backup_password_keys(
|
BackupPasswordKeys sse_decode_backup_password_keys(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -235,6 +403,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
bool sse_decode_bool(SseDeserializer deserializer);
|
bool sse_decode_bool(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState sse_decode_box_autoadd_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys sse_decode_box_autoadd_backup_password_keys(
|
BackupPasswordKeys sse_decode_box_autoadd_backup_password_keys(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -248,12 +421,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int sse_decode_box_autoadd_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);
|
PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
InitConfig sse_decode_box_autoadd_init_config(SseDeserializer deserializer);
|
InitConfig sse_decode_box_autoadd_init_config(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult sse_decode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage sse_decode_box_autoadd_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_box_autoadd_u_32(SseDeserializer deserializer);
|
int sse_decode_box_autoadd_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -271,6 +457,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer);
|
FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int sse_decode_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);
|
PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -285,6 +474,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalDecryptResult sse_decode_legacy_signal_decrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult sse_decode_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalPreKey sse_decode_legacy_signal_pre_key(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
LegacyTableMigrationCount sse_decode_legacy_table_migration_count(
|
LegacyTableMigrationCount sse_decode_legacy_table_migration_count(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -298,6 +502,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<LegacySignalPreKey> sse_decode_list_legacy_signal_pre_key(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<LegacyTableMigrationCount> sse_decode_list_legacy_table_migration_count(
|
List<LegacyTableMigrationCount> sse_decode_list_legacy_table_migration_count(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -308,6 +517,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<PqcPreKeyInput> sse_decode_list_pqc_pre_key_input(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
Int64List sse_decode_list_prim_i_64_strict(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<int> sse_decode_list_prim_u_8_loose(SseDeserializer deserializer);
|
List<int> sse_decode_list_prim_u_8_loose(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -329,18 +546,45 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
String? sse_decode_opt_String(SseDeserializer deserializer);
|
String? sse_decode_opt_String(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState? sse_decode_opt_box_autoadd_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer);
|
double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);
|
PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult?
|
||||||
|
sse_decode_opt_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage? sse_decode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer);
|
int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer);
|
Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PqcPreKeyInput sse_decode_pqc_pre_key_input(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage sse_decode_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
(PlatformInt64, Uint8List) sse_decode_record_i_64_list_prim_u_8_strict(
|
(PlatformInt64, Uint8List) sse_decode_record_i_64_list_prim_u_8_strict(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -356,6 +600,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustApi sse_decode_rust_api(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
RustAppDatabase sse_decode_rust_app_database(SseDeserializer deserializer);
|
RustAppDatabase sse_decode_rust_app_database(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -378,6 +625,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustUtils sse_decode_rust_utils(SseDeserializer deserializer);
|
RustUtils sse_decode_rust_utils(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultEmpty sse_decode_server_result_empty(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultI64 sse_decode_server_result_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultVecU8 sse_decode_server_result_vec_u_8(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
SqlExecutionResult sse_decode_sql_execution_result(
|
SqlExecutionResult sse_decode_sql_execution_result(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -395,6 +655,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_u_32(SseDeserializer deserializer);
|
int sse_decode_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
BigInt sse_decode_u_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_u_8(SseDeserializer deserializer);
|
int sse_decode_u_8(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -407,21 +670,92 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
BigInt sse_decode_usize(SseDeserializer deserializer);
|
BigInt sse_decode_usize(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
|
||||||
int sse_decode_i_32(SseDeserializer deserializer);
|
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_AnyhowException(
|
void sse_encode_AnyhowException(
|
||||||
AnyhowException self,
|
AnyhowException self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_String_String_i_64_String_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, String, PlatformInt64, String) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_String_bool_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, bool) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_String_i_64_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, PlatformInt64) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
void sse_encode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
||||||
FutureOr<RustStreamSink<String>> Function() self,
|
FutureOr<RustStreamSink<String>> Function() self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs__Output_list_legacy_signal_pre_key_AnyhowException(
|
||||||
|
FutureOr<List<LegacySignalPreKey>> Function() self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs__Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function() self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_i_64_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_i_64_String_String_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64, String, String) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_opt_box_autoadd_legacy_signal_encrypt_result_AnyhowException(
|
||||||
|
FutureOr<LegacySignalEncryptResult?> Function(PlatformInt64, Uint8List)
|
||||||
|
self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64, Uint8List) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_i_32_Output_legacy_signal_decrypt_result_AnyhowException(
|
||||||
|
FutureOr<LegacySignalDecryptResult> Function(PlatformInt64, Uint8List, int)
|
||||||
|
self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_opt_String_list_prim_u_8_strict_i_32_Output_opt_list_prim_u_8_strict_AnyhowException(
|
||||||
|
FutureOr<Uint8List?> Function(PlatformInt64, String?, Uint8List, int) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -437,9 +771,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_StreamSink_api_event_Sse(
|
||||||
|
RustStreamSink<ApiEvent> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_String(String self, SseSerializer serializer);
|
void sse_encode_String(String self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_connection_state(
|
||||||
|
ApiConnectionState self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_event(ApiEvent self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_event_kind(ApiEventKind self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_backup_password_keys(
|
void sse_encode_backup_password_keys(
|
||||||
BackupPasswordKeys self,
|
BackupPasswordKeys self,
|
||||||
|
|
@ -449,6 +801,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_api_connection_state(
|
||||||
|
ApiConnectionState self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_backup_password_keys(
|
void sse_encode_box_autoadd_backup_password_keys(
|
||||||
BackupPasswordKeys self,
|
BackupPasswordKeys self,
|
||||||
|
|
@ -464,6 +822,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_i_64(
|
void sse_encode_box_autoadd_i_64(
|
||||||
PlatformInt64 self,
|
PlatformInt64 self,
|
||||||
|
|
@ -476,6 +837,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer);
|
void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -497,6 +870,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_i_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer);
|
void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -512,6 +888,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_decrypt_result(
|
||||||
|
LegacySignalDecryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_pre_key(
|
||||||
|
LegacySignalPreKey self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_legacy_table_migration_count(
|
void sse_encode_legacy_table_migration_count(
|
||||||
LegacyTableMigrationCount self,
|
LegacyTableMigrationCount self,
|
||||||
|
|
@ -527,6 +921,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_legacy_signal_pre_key(
|
||||||
|
List<LegacySignalPreKey> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_list_legacy_table_migration_count(
|
void sse_encode_list_legacy_table_migration_count(
|
||||||
List<LegacyTableMigrationCount> self,
|
List<LegacyTableMigrationCount> self,
|
||||||
|
|
@ -539,6 +939,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_pqc_pre_key_input(
|
||||||
|
List<PqcPreKeyInput> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_prim_i_64_strict(
|
||||||
|
Int64List self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -563,15 +975,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_api_connection_state(
|
||||||
|
ApiConnectionState? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer);
|
void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_i_64(
|
void sse_encode_opt_box_autoadd_i_64(
|
||||||
PlatformInt64? self,
|
PlatformInt64? self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer);
|
void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -581,6 +1014,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_pqc_pre_key_input(
|
||||||
|
PqcPreKeyInput self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_record_i_64_list_prim_u_8_strict(
|
void sse_encode_record_i_64_list_prim_u_8_strict(
|
||||||
(PlatformInt64, Uint8List) self,
|
(PlatformInt64, Uint8List) self,
|
||||||
|
|
@ -599,6 +1044,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_rust_api(RustApi self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_rust_app_database(
|
void sse_encode_rust_app_database(
|
||||||
RustAppDatabase self,
|
RustAppDatabase self,
|
||||||
|
|
@ -629,6 +1077,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_rust_utils(RustUtils self, SseSerializer serializer);
|
void sse_encode_rust_utils(RustUtils self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_empty(
|
||||||
|
ServerResultEmpty self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_i_64(
|
||||||
|
ServerResultI64 self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_vec_u_8(
|
||||||
|
ServerResultVecU8 self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_sql_execution_result(
|
void sse_encode_sql_execution_result(
|
||||||
SqlExecutionResult self,
|
SqlExecutionResult self,
|
||||||
|
|
@ -647,6 +1113,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_u_32(int self, SseSerializer serializer);
|
void sse_encode_u_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_u_64(BigInt self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_u_8(int self, SseSerializer serializer);
|
void sse_encode_u_8(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -658,9 +1127,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
|
||||||
void sse_encode_i_32(int self, SseSerializer serializer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Section: wire_class
|
// Section: wire_class
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,11 @@
|
||||||
// Static analysis wrongly picks the IO variant, thus ignore this
|
// Static analysis wrongly picks the IO variant, thus ignore this
|
||||||
// ignore_for_file: argument_type_not_assignable
|
// ignore_for_file: argument_type_not_assignable
|
||||||
|
|
||||||
|
import 'api/server/prekeys.dart';
|
||||||
import 'bridge.dart';
|
import 'bridge.dart';
|
||||||
|
import 'bridge/api.dart';
|
||||||
import 'bridge/callbacks.dart';
|
import 'bridge/callbacks.dart';
|
||||||
|
import 'bridge/groups.dart';
|
||||||
import 'bridge/wrapper.dart';
|
import 'bridge/wrapper.dart';
|
||||||
import 'bridge/wrapper/app_database.dart';
|
import 'bridge/wrapper/app_database.dart';
|
||||||
import 'bridge/wrapper/backup.dart';
|
import 'bridge/wrapper/backup.dart';
|
||||||
|
|
@ -34,12 +37,70 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, String, PlatformInt64, String)
|
||||||
|
dco_decode_DartFn_Inputs_String_String_i_64_String_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, bool)
|
||||||
|
dco_decode_DartFn_Inputs_String_bool_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(String, PlatformInt64)
|
||||||
|
dco_decode_DartFn_Inputs_String_i_64_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
FutureOr<RustStreamSink<String>> Function()
|
FutureOr<RustStreamSink<String>> Function()
|
||||||
dco_decode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
dco_decode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<List<LegacySignalPreKey>> Function()
|
||||||
|
dco_decode_DartFn_Inputs__Output_list_legacy_signal_pre_key_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function()
|
||||||
|
dco_decode_DartFn_Inputs__Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_Output_unit_AnyhowException(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64, String, String)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_String_String_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<LegacySignalEncryptResult?> Function(PlatformInt64, Uint8List)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_opt_box_autoadd_legacy_signal_encrypt_result_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<void> Function(PlatformInt64, Uint8List)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_unit_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<LegacySignalDecryptResult> Function(PlatformInt64, Uint8List, int)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_list_prim_u_8_strict_i_32_Output_legacy_signal_decrypt_result_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
FutureOr<Uint8List?> Function(PlatformInt64, String?, Uint8List, int)
|
||||||
|
dco_decode_DartFn_Inputs_i_64_opt_String_list_prim_u_8_strict_i_32_Output_opt_list_prim_u_8_strict_AnyhowException(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Object dco_decode_DartOpaque(dynamic raw);
|
Object dco_decode_DartOpaque(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -51,15 +112,30 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustStreamSink<String> dco_decode_StreamSink_String_Sse(dynamic raw);
|
RustStreamSink<String> dco_decode_StreamSink_String_Sse(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustStreamSink<ApiEvent> dco_decode_StreamSink_api_event_Sse(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
String dco_decode_String(dynamic raw);
|
String dco_decode_String(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState dco_decode_api_connection_state(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEvent dco_decode_api_event(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEventKind dco_decode_api_event_kind(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys dco_decode_backup_password_keys(dynamic raw);
|
BackupPasswordKeys dco_decode_backup_password_keys(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
bool dco_decode_bool(dynamic raw);
|
bool dco_decode_bool(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState dco_decode_box_autoadd_api_connection_state(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys dco_decode_box_autoadd_backup_password_keys(dynamic raw);
|
BackupPasswordKeys dco_decode_box_autoadd_backup_password_keys(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -69,12 +145,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw);
|
FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int dco_decode_box_autoadd_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);
|
PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
InitConfig dco_decode_box_autoadd_init_config(dynamic raw);
|
InitConfig dco_decode_box_autoadd_init_config(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult dco_decode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage dco_decode_box_autoadd_prepared_outgoing_message(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_box_autoadd_u_32(dynamic raw);
|
int dco_decode_box_autoadd_u_32(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -90,6 +179,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw);
|
FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int dco_decode_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 dco_decode_i_64(dynamic raw);
|
PlatformInt64 dco_decode_i_64(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -102,6 +194,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
LegacyMigrationReport dco_decode_legacy_migration_report(dynamic raw);
|
LegacyMigrationReport dco_decode_legacy_migration_report(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalDecryptResult dco_decode_legacy_signal_decrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult dco_decode_legacy_signal_encrypt_result(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalPreKey dco_decode_legacy_signal_pre_key(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
LegacyTableMigrationCount dco_decode_legacy_table_migration_count(
|
LegacyTableMigrationCount dco_decode_legacy_table_migration_count(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -113,6 +218,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
List<FrbPqcPreKey> dco_decode_list_frb_pqc_pre_key(dynamic raw);
|
List<FrbPqcPreKey> dco_decode_list_frb_pqc_pre_key(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<LegacySignalPreKey> dco_decode_list_legacy_signal_pre_key(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<LegacyTableMigrationCount> dco_decode_list_legacy_table_migration_count(
|
List<LegacyTableMigrationCount> dco_decode_list_legacy_table_migration_count(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -121,6 +229,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
List<Uint8List> dco_decode_list_list_prim_u_8_strict(dynamic raw);
|
List<Uint8List> dco_decode_list_list_prim_u_8_strict(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<PqcPreKeyInput> dco_decode_list_pqc_pre_key_input(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
Int64List dco_decode_list_prim_i_64_strict(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<int> dco_decode_list_prim_u_8_loose(dynamic raw);
|
List<int> dco_decode_list_prim_u_8_loose(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -140,18 +254,41 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
String? dco_decode_opt_String(dynamic raw);
|
String? dco_decode_opt_String(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState? dco_decode_opt_box_autoadd_api_connection_state(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
double? dco_decode_opt_box_autoadd_f_64(dynamic raw);
|
double? dco_decode_opt_box_autoadd_f_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int? dco_decode_opt_box_autoadd_i_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);
|
PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult?
|
||||||
|
dco_decode_opt_box_autoadd_legacy_signal_encrypt_result(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage? dco_decode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
dynamic raw,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int? dco_decode_opt_box_autoadd_u_32(dynamic raw);
|
int? dco_decode_opt_box_autoadd_u_32(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw);
|
Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PqcPreKeyInput dco_decode_pqc_pre_key_input(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage dco_decode_prepared_outgoing_message(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
(PlatformInt64, Uint8List) dco_decode_record_i_64_list_prim_u_8_strict(
|
(PlatformInt64, Uint8List) dco_decode_record_i_64_list_prim_u_8_strict(
|
||||||
dynamic raw,
|
dynamic raw,
|
||||||
|
|
@ -165,6 +302,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
(String, String) dco_decode_record_string_string(dynamic raw);
|
(String, String) dco_decode_record_string_string(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustApi dco_decode_rust_api(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
RustAppDatabase dco_decode_rust_app_database(dynamic raw);
|
RustAppDatabase dco_decode_rust_app_database(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -183,6 +323,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustUtils dco_decode_rust_utils(dynamic raw);
|
RustUtils dco_decode_rust_utils(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultEmpty dco_decode_server_result_empty(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultI64 dco_decode_server_result_i_64(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultVecU8 dco_decode_server_result_vec_u_8(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
SqlExecutionResult dco_decode_sql_execution_result(dynamic raw);
|
SqlExecutionResult dco_decode_sql_execution_result(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -198,6 +347,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_u_32(dynamic raw);
|
int dco_decode_u_32(dynamic raw);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
BigInt dco_decode_u_64(dynamic raw);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int dco_decode_u_8(dynamic raw);
|
int dco_decode_u_8(dynamic raw);
|
||||||
|
|
||||||
|
|
@ -226,9 +378,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustStreamSink<ApiEvent> sse_decode_StreamSink_api_event_Sse(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
String sse_decode_String(SseDeserializer deserializer);
|
String sse_decode_String(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState sse_decode_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEvent sse_decode_api_event(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiEventKind sse_decode_api_event_kind(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys sse_decode_backup_password_keys(
|
BackupPasswordKeys sse_decode_backup_password_keys(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -237,6 +405,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
bool sse_decode_bool(SseDeserializer deserializer);
|
bool sse_decode_bool(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState sse_decode_box_autoadd_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
BackupPasswordKeys sse_decode_box_autoadd_backup_password_keys(
|
BackupPasswordKeys sse_decode_box_autoadd_backup_password_keys(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -250,12 +423,25 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int sse_decode_box_autoadd_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);
|
PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
InitConfig sse_decode_box_autoadd_init_config(SseDeserializer deserializer);
|
InitConfig sse_decode_box_autoadd_init_config(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult sse_decode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage sse_decode_box_autoadd_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_box_autoadd_u_32(SseDeserializer deserializer);
|
int sse_decode_box_autoadd_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -273,6 +459,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer);
|
FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int sse_decode_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);
|
PlatformInt64 sse_decode_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -287,6 +476,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalDecryptResult sse_decode_legacy_signal_decrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult sse_decode_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalPreKey sse_decode_legacy_signal_pre_key(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
LegacyTableMigrationCount sse_decode_legacy_table_migration_count(
|
LegacyTableMigrationCount sse_decode_legacy_table_migration_count(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -300,6 +504,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<LegacySignalPreKey> sse_decode_list_legacy_signal_pre_key(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<LegacyTableMigrationCount> sse_decode_list_legacy_table_migration_count(
|
List<LegacyTableMigrationCount> sse_decode_list_legacy_table_migration_count(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -310,6 +519,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
List<PqcPreKeyInput> sse_decode_list_pqc_pre_key_input(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
Int64List sse_decode_list_prim_i_64_strict(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
List<int> sse_decode_list_prim_u_8_loose(SseDeserializer deserializer);
|
List<int> sse_decode_list_prim_u_8_loose(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -331,18 +548,45 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
String? sse_decode_opt_String(SseDeserializer deserializer);
|
String? sse_decode_opt_String(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ApiConnectionState? sse_decode_opt_box_autoadd_api_connection_state(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer);
|
double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
int? sse_decode_opt_box_autoadd_i_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);
|
PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
LegacySignalEncryptResult?
|
||||||
|
sse_decode_opt_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage? sse_decode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer);
|
int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer);
|
Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PqcPreKeyInput sse_decode_pqc_pre_key_input(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
PreparedOutgoingMessage sse_decode_prepared_outgoing_message(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
(PlatformInt64, Uint8List) sse_decode_record_i_64_list_prim_u_8_strict(
|
(PlatformInt64, Uint8List) sse_decode_record_i_64_list_prim_u_8_strict(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -358,6 +602,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
RustApi sse_decode_rust_api(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
RustAppDatabase sse_decode_rust_app_database(SseDeserializer deserializer);
|
RustAppDatabase sse_decode_rust_app_database(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -380,6 +627,19 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
RustUtils sse_decode_rust_utils(SseDeserializer deserializer);
|
RustUtils sse_decode_rust_utils(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultEmpty sse_decode_server_result_empty(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultI64 sse_decode_server_result_i_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
ServerResultVecU8 sse_decode_server_result_vec_u_8(
|
||||||
|
SseDeserializer deserializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
SqlExecutionResult sse_decode_sql_execution_result(
|
SqlExecutionResult sse_decode_sql_execution_result(
|
||||||
SseDeserializer deserializer,
|
SseDeserializer deserializer,
|
||||||
|
|
@ -397,6 +657,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_u_32(SseDeserializer deserializer);
|
int sse_decode_u_32(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
BigInt sse_decode_u_64(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
int sse_decode_u_8(SseDeserializer deserializer);
|
int sse_decode_u_8(SseDeserializer deserializer);
|
||||||
|
|
||||||
|
|
@ -409,21 +672,92 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
BigInt sse_decode_usize(SseDeserializer deserializer);
|
BigInt sse_decode_usize(SseDeserializer deserializer);
|
||||||
|
|
||||||
@protected
|
|
||||||
int sse_decode_i_32(SseDeserializer deserializer);
|
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_AnyhowException(
|
void sse_encode_AnyhowException(
|
||||||
AnyhowException self,
|
AnyhowException self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_String_String_i_64_String_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, String, PlatformInt64, String) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_String_bool_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, bool) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_String_i_64_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(String, PlatformInt64) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
void sse_encode_DartFn_Inputs__Output_StreamSink_String_Sse_AnyhowException(
|
||||||
FutureOr<RustStreamSink<String>> Function() self,
|
FutureOr<RustStreamSink<String>> Function() self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs__Output_list_legacy_signal_pre_key_AnyhowException(
|
||||||
|
FutureOr<List<LegacySignalPreKey>> Function() self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs__Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function() self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_i_64_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_DartFn_Inputs_i_64_String_String_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64, String, String) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_opt_box_autoadd_legacy_signal_encrypt_result_AnyhowException(
|
||||||
|
FutureOr<LegacySignalEncryptResult?> Function(PlatformInt64, Uint8List)
|
||||||
|
self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_Output_unit_AnyhowException(
|
||||||
|
FutureOr<void> Function(PlatformInt64, Uint8List) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_list_prim_u_8_strict_i_32_Output_legacy_signal_decrypt_result_AnyhowException(
|
||||||
|
FutureOr<LegacySignalDecryptResult> Function(PlatformInt64, Uint8List, int)
|
||||||
|
self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void
|
||||||
|
sse_encode_DartFn_Inputs_i_64_opt_String_list_prim_u_8_strict_i_32_Output_opt_list_prim_u_8_strict_AnyhowException(
|
||||||
|
FutureOr<Uint8List?> Function(PlatformInt64, String?, Uint8List, int) self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -439,9 +773,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_StreamSink_api_event_Sse(
|
||||||
|
RustStreamSink<ApiEvent> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_String(String self, SseSerializer serializer);
|
void sse_encode_String(String self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_connection_state(
|
||||||
|
ApiConnectionState self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_event(ApiEvent self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_api_event_kind(ApiEventKind self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_backup_password_keys(
|
void sse_encode_backup_password_keys(
|
||||||
BackupPasswordKeys self,
|
BackupPasswordKeys self,
|
||||||
|
|
@ -451,6 +803,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_api_connection_state(
|
||||||
|
ApiConnectionState self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_backup_password_keys(
|
void sse_encode_box_autoadd_backup_password_keys(
|
||||||
BackupPasswordKeys self,
|
BackupPasswordKeys self,
|
||||||
|
|
@ -466,6 +824,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_i_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_i_64(
|
void sse_encode_box_autoadd_i_64(
|
||||||
PlatformInt64 self,
|
PlatformInt64 self,
|
||||||
|
|
@ -478,6 +839,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_box_autoadd_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer);
|
void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -499,6 +872,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_i_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer);
|
void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -514,6 +890,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_decrypt_result(
|
||||||
|
LegacySignalDecryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_legacy_signal_pre_key(
|
||||||
|
LegacySignalPreKey self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_legacy_table_migration_count(
|
void sse_encode_legacy_table_migration_count(
|
||||||
LegacyTableMigrationCount self,
|
LegacyTableMigrationCount self,
|
||||||
|
|
@ -529,6 +923,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_legacy_signal_pre_key(
|
||||||
|
List<LegacySignalPreKey> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_list_legacy_table_migration_count(
|
void sse_encode_list_legacy_table_migration_count(
|
||||||
List<LegacyTableMigrationCount> self,
|
List<LegacyTableMigrationCount> self,
|
||||||
|
|
@ -541,6 +941,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_pqc_pre_key_input(
|
||||||
|
List<PqcPreKeyInput> self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_list_prim_i_64_strict(
|
||||||
|
Int64List self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -565,15 +977,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_api_connection_state(
|
||||||
|
ApiConnectionState? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer);
|
void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_i_32(int? self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_i_64(
|
void sse_encode_opt_box_autoadd_i_64(
|
||||||
PlatformInt64? self,
|
PlatformInt64? self,
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_legacy_signal_encrypt_result(
|
||||||
|
LegacySignalEncryptResult? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_opt_box_autoadd_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage? self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer);
|
void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -583,6 +1016,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_pqc_pre_key_input(
|
||||||
|
PqcPreKeyInput self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_prepared_outgoing_message(
|
||||||
|
PreparedOutgoingMessage self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_record_i_64_list_prim_u_8_strict(
|
void sse_encode_record_i_64_list_prim_u_8_strict(
|
||||||
(PlatformInt64, Uint8List) self,
|
(PlatformInt64, Uint8List) self,
|
||||||
|
|
@ -601,6 +1046,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
SseSerializer serializer,
|
SseSerializer serializer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_rust_api(RustApi self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_rust_app_database(
|
void sse_encode_rust_app_database(
|
||||||
RustAppDatabase self,
|
RustAppDatabase self,
|
||||||
|
|
@ -631,6 +1079,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_rust_utils(RustUtils self, SseSerializer serializer);
|
void sse_encode_rust_utils(RustUtils self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_empty(
|
||||||
|
ServerResultEmpty self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_i_64(
|
||||||
|
ServerResultI64 self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_server_result_vec_u_8(
|
||||||
|
ServerResultVecU8 self,
|
||||||
|
SseSerializer serializer,
|
||||||
|
);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_sql_execution_result(
|
void sse_encode_sql_execution_result(
|
||||||
SqlExecutionResult self,
|
SqlExecutionResult self,
|
||||||
|
|
@ -649,6 +1115,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_u_32(int self, SseSerializer serializer);
|
void sse_encode_u_32(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
@protected
|
||||||
|
void sse_encode_u_64(BigInt self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_u_8(int self, SseSerializer serializer);
|
void sse_encode_u_8(int self, SseSerializer serializer);
|
||||||
|
|
||||||
|
|
@ -660,9 +1129,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
||||||
|
|
||||||
@protected
|
|
||||||
void sse_encode_i_32(int self, SseSerializer serializer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Section: wire_class
|
// Section: wire_class
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,9 @@ Future<bool> twonlyMinimumInitialization() async {
|
||||||
final legacyDatabase = TwonlyDB(NativeDatabase(legacyFile));
|
final legacyDatabase = TwonlyDB(NativeDatabase(legacyFile));
|
||||||
// Opening the database applies every existing Drift migration up
|
// Opening the database applies every existing Drift migration up
|
||||||
// to v25 before Rust copies the application tables.
|
// to v25 before Rust copies the application tables.
|
||||||
await legacyDatabase.customSelect('PRAGMA user_version').getSingle();
|
await legacyDatabase
|
||||||
|
.customSelect('PRAGMA user_version')
|
||||||
|
.getSingle();
|
||||||
await legacyDatabase.close();
|
await legacyDatabase.close();
|
||||||
}
|
}
|
||||||
await RustAppDatabase.migrateLegacyDatabase();
|
await RustAppDatabase.migrateLegacyDatabase();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,125 @@
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
||||||
import 'package:twonly/core/bridge/callbacks.dart';
|
import 'package:twonly/core/bridge/callbacks.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
|
import 'package:twonly/locator.dart';
|
||||||
|
import 'package:twonly/src/callbacks/legacy_signal.callbacks.dart';
|
||||||
import 'package:twonly/src/callbacks/logging.callbacks.dart';
|
import 'package:twonly/src/callbacks/logging.callbacks.dart';
|
||||||
|
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||||
|
as pb;
|
||||||
|
import 'package:twonly/src/model/protobuf/client/generated/push_notification.pb.dart'
|
||||||
|
as push_pb;
|
||||||
|
import 'package:twonly/src/services/api/client2client/errors.c2c.dart';
|
||||||
|
import 'package:twonly/src/services/api/mediafiles/download.api.dart';
|
||||||
|
import 'package:twonly/src/services/api/mediafiles/upload.api.dart';
|
||||||
|
import 'package:twonly/src/services/api/messages.api.dart';
|
||||||
|
import 'package:twonly/src/services/flame.service.dart';
|
||||||
|
import 'package:twonly/src/services/group.service.dart';
|
||||||
|
import 'package:twonly/src/services/key_verification.service.dart';
|
||||||
|
import 'package:twonly/src/services/mediafiles/mediafile.service.dart';
|
||||||
|
import 'package:twonly/src/services/notifications/pushkeys.notifications.dart';
|
||||||
|
import 'package:twonly/src/services/passwordless_recovery.service.dart';
|
||||||
|
import 'package:twonly/src/services/signal/session.signal.dart';
|
||||||
|
import 'package:twonly/src/utils/avatars.dart';
|
||||||
|
|
||||||
|
Future<Uint8List?> _apiCreatePushData(
|
||||||
|
int contactId,
|
||||||
|
String? messageId,
|
||||||
|
Uint8List plaintext,
|
||||||
|
int messageType,
|
||||||
|
) async {
|
||||||
|
final notification = messageType == pb.Message_Type.TEST_NOTIFICATION.value
|
||||||
|
? push_pb.PushNotification(kind: push_pb.PushKind.TEST_NOTIFICATION)
|
||||||
|
: await getPushNotificationFromEncryptedContent(
|
||||||
|
contactId,
|
||||||
|
messageId,
|
||||||
|
pb.EncryptedContent.fromBuffer(plaintext),
|
||||||
|
);
|
||||||
|
if (notification == null) return null;
|
||||||
|
return encryptPushNotification(contactId, notification);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _apiMediaAction(
|
||||||
|
String kind,
|
||||||
|
String mediaId,
|
||||||
|
int contactId,
|
||||||
|
String messageId,
|
||||||
|
) async {
|
||||||
|
if (kind == 'response') {
|
||||||
|
await handleMediaRelatedResponseFromReceiver(messageId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (kind == 'delete') {
|
||||||
|
final media = await MediaFileService.fromMediaId(mediaId);
|
||||||
|
media?.fullMediaRemoval();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final media = await twonlyDB.mediaFilesDao.getMediaFileById(mediaId);
|
||||||
|
if (media == null) return;
|
||||||
|
switch (kind) {
|
||||||
|
case 'download':
|
||||||
|
await startDownloadMedia(media, false);
|
||||||
|
case 'stored':
|
||||||
|
await MediaFileService(media).storeMediaFile();
|
||||||
|
case 'reupload':
|
||||||
|
await reuploadMediaFile(contactId, media, messageId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _apiGroupStateRefresh(String groupId, bool created) async {
|
||||||
|
if (created) {
|
||||||
|
await fetchGroupStatesForUnjoinedGroups();
|
||||||
|
final group = await twonlyDB.groupsDao.getGroup(groupId);
|
||||||
|
if (group?.myGroupPrivateKey == null) return;
|
||||||
|
final key = IdentityKeyPair.fromSerialized(group!.myGroupPrivateKey!);
|
||||||
|
await sendCipherTextToGroup(
|
||||||
|
groupId,
|
||||||
|
pb.EncryptedContent(
|
||||||
|
groupJoin: pb.EncryptedContent_GroupJoin(
|
||||||
|
groupPublicKey: key.getPublicKey().serialize(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final group = await twonlyDB.groupsDao.getGroup(groupId);
|
||||||
|
if (group != null) await fetchGroupState(group);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> initFlutterCallbacksForRust() async {
|
Future<void> initFlutterCallbacksForRust() async {
|
||||||
await initFlutterCallbacks(
|
await initFlutterCallbacks(
|
||||||
callbackId: isolateCallbackId,
|
callbackId: isolateCallbackId,
|
||||||
loggingGetStreamSink: LoggingCallbacks.getStreamSink,
|
loggingGetStreamSink: LoggingCallbacks.getStreamSink,
|
||||||
|
legacySignalDecrypt: LegacySignalCallbacks.decrypt,
|
||||||
|
legacySignalEncrypt: LegacySignalCallbacks.encrypt,
|
||||||
|
legacySignalGeneratePrekeys: LegacySignalCallbacks.generatePrekeys,
|
||||||
|
apiResyncSignalSession: handleSessionResync,
|
||||||
|
apiPushKeyRequested: (contactId) =>
|
||||||
|
setupNotificationWithUsers(forceContact: contactId),
|
||||||
|
apiGroupMembershipError: (contactId, groupId, relatedReceiptId) =>
|
||||||
|
handleErrorMessage(
|
||||||
|
contactId,
|
||||||
|
pb.EncryptedContent_ErrorMessages(
|
||||||
|
type: pb
|
||||||
|
.EncryptedContent_ErrorMessages_Type
|
||||||
|
.GROUP_NOT_FOUND_OR_NOT_A_MEMBER,
|
||||||
|
relatedReceiptId: relatedReceiptId,
|
||||||
|
),
|
||||||
|
relatedReceiptId,
|
||||||
|
groupId: groupId,
|
||||||
|
),
|
||||||
|
apiMediaAction: _apiMediaAction,
|
||||||
|
apiVerificationProof: KeyVerificationService.handleVerificationProof,
|
||||||
|
apiCreatePushData: _apiCreatePushData,
|
||||||
|
apiCreatePushAvatars: (contactId) =>
|
||||||
|
createPushAvatars(forceForUserId: contactId),
|
||||||
|
apiRecoveryChanged: PasswordlessRecoveryService.performHeartbeat,
|
||||||
|
apiMediaReceived: (groupId, timestamp) => incFlameCounter(
|
||||||
|
groupId,
|
||||||
|
true,
|
||||||
|
DateTime.fromMillisecondsSinceEpoch(timestamp),
|
||||||
|
),
|
||||||
|
apiGroupStateRefresh: _apiGroupStateRefresh,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
87
lib/src/callbacks/legacy_signal.callbacks.dart
Normal file
87
lib/src/callbacks/legacy_signal.callbacks.dart
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||||
|
import 'package:twonly/core/bridge/callbacks.dart';
|
||||||
|
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||||
|
as pb;
|
||||||
|
import 'package:twonly/src/services/signal/encryption.signal.dart';
|
||||||
|
import 'package:twonly/src/services/signal/identity.signal.dart';
|
||||||
|
import 'package:twonly/src/utils/log.dart';
|
||||||
|
|
||||||
|
/// Flutter boundary for the legacy libsignal_protocol_dart implementation.
|
||||||
|
///
|
||||||
|
/// Only V1 CIPHERTEXT and PREKEY_BUNDLE messages may cross this boundary.
|
||||||
|
/// CIPHERTEXT_V2 remains fully Rust-owned.
|
||||||
|
abstract final class LegacySignalCallbacks {
|
||||||
|
static Future<LegacySignalDecryptResult> decrypt(
|
||||||
|
PlatformInt64 fromUserId,
|
||||||
|
Uint8List ciphertext,
|
||||||
|
int messageType,
|
||||||
|
) async {
|
||||||
|
if (!_isLegacyMessageType(messageType)) {
|
||||||
|
return const LegacySignalDecryptResult(
|
||||||
|
decryptionErrorType: 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
final (content, errorType) = await signalDecryptMessageV1(
|
||||||
|
fromUserId,
|
||||||
|
ciphertext,
|
||||||
|
messageType,
|
||||||
|
);
|
||||||
|
return LegacySignalDecryptResult(
|
||||||
|
plaintext: content == null
|
||||||
|
? null
|
||||||
|
: Uint8List.fromList(content.writeToBuffer()),
|
||||||
|
decryptionErrorType: errorType?.value,
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
Log.error('Legacy Signal decryption callback failed: $error');
|
||||||
|
return const LegacySignalDecryptResult(decryptionErrorType: 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<LegacySignalEncryptResult?> encrypt(
|
||||||
|
PlatformInt64 targetUserId,
|
||||||
|
Uint8List plaintext,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
final encrypted = await signalEncryptMessage(
|
||||||
|
targetUserId,
|
||||||
|
plaintext,
|
||||||
|
);
|
||||||
|
if (encrypted == null || !_isLegacyMessageType(encrypted.type.value)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return LegacySignalEncryptResult(
|
||||||
|
ciphertext: encrypted.ciphertext,
|
||||||
|
messageType: encrypted.type.value,
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
Log.error('Legacy Signal encryption callback failed: $error');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<List<LegacySignalPreKey>> generatePrekeys() async {
|
||||||
|
try {
|
||||||
|
final prekeys = await signalGetPreKeys();
|
||||||
|
return prekeys
|
||||||
|
.map(
|
||||||
|
(prekey) => LegacySignalPreKey(
|
||||||
|
id: prekey.id,
|
||||||
|
publicKey: Uint8List.fromList(
|
||||||
|
prekey.getKeyPair().publicKey.serialize(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(growable: false);
|
||||||
|
} catch (error) {
|
||||||
|
Log.error('Legacy Signal prekey callback failed: $error');
|
||||||
|
return const [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool _isLegacyMessageType(int messageType) =>
|
||||||
|
messageType == pb.Message_Type.CIPHERTEXT.value ||
|
||||||
|
messageType == pb.Message_Type.PREKEY_BUNDLE.value;
|
||||||
|
}
|
||||||
|
|
@ -16,7 +16,8 @@ class LoggingCallbacks {
|
||||||
Log.info(log.split('INFO ')[1]);
|
Log.info(log.split('INFO ')[1]);
|
||||||
} else if (log.contains('DEBUG ')) {
|
} else if (log.contains('DEBUG ')) {
|
||||||
Log.info(log.split('DEBUG ')[1]);
|
Log.info(log.split('DEBUG ')[1]);
|
||||||
} else if (kDebugMode && !Platform.environment.containsKey('FLUTTER_TEST')) {
|
} else if (kDebugMode &&
|
||||||
|
!Platform.environment.containsKey('FLUTTER_TEST')) {
|
||||||
// ignore: avoid_print
|
// ignore: avoid_print
|
||||||
print(log);
|
print(log);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,9 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:twonly/src/utils/log.dart';
|
import 'package:twonly/src/utils/log.dart';
|
||||||
|
|
||||||
abstract class VideoCompressionChannel {
|
abstract class VideoCompressionChannel {
|
||||||
static const MethodChannel _channel =
|
static const MethodChannel _channel = MethodChannel(
|
||||||
MethodChannel('eu.twonly/videoCompression');
|
'eu.twonly/videoCompression',
|
||||||
|
);
|
||||||
|
|
||||||
static void Function(double)? _currentProgressCallback;
|
static void Function(double)? _currentProgressCallback;
|
||||||
static bool _handlerSetup = false;
|
static bool _handlerSetup = false;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,12 @@ class DriftLoggingInterceptor extends QueryInterceptor {
|
||||||
String statement,
|
String statement,
|
||||||
List<Object?> args,
|
List<Object?> args,
|
||||||
) {
|
) {
|
||||||
return _run('INSERT', statement, args, () => executor.runInsert(statement, args));
|
return _run(
|
||||||
|
'INSERT',
|
||||||
|
statement,
|
||||||
|
args,
|
||||||
|
() => executor.runInsert(statement, args),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -95,7 +100,12 @@ class DriftLoggingInterceptor extends QueryInterceptor {
|
||||||
String statement,
|
String statement,
|
||||||
List<Object?> args,
|
List<Object?> args,
|
||||||
) {
|
) {
|
||||||
return _run('UPDATE', statement, args, () => executor.runUpdate(statement, args));
|
return _run(
|
||||||
|
'UPDATE',
|
||||||
|
statement,
|
||||||
|
args,
|
||||||
|
() => executor.runUpdate(statement, args),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -104,7 +114,12 @@ class DriftLoggingInterceptor extends QueryInterceptor {
|
||||||
String statement,
|
String statement,
|
||||||
List<Object?> args,
|
List<Object?> args,
|
||||||
) {
|
) {
|
||||||
return _run('DELETE', statement, args, () => executor.runDelete(statement, args));
|
return _run(
|
||||||
|
'DELETE',
|
||||||
|
statement,
|
||||||
|
args,
|
||||||
|
() => executor.runDelete(statement, args),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -113,7 +128,12 @@ class DriftLoggingInterceptor extends QueryInterceptor {
|
||||||
String statement,
|
String statement,
|
||||||
List<Object?> args,
|
List<Object?> args,
|
||||||
) {
|
) {
|
||||||
return _run('CUSTOM', statement, args, () => executor.runCustom(statement, args));
|
return _run(
|
||||||
|
'CUSTOM',
|
||||||
|
statement,
|
||||||
|
args,
|
||||||
|
() => executor.runCustom(statement, args),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ import 'package:twonly/core/database/app.dart' as rust;
|
||||||
/// This keeps the existing generated models, DAO methods and query watches
|
/// This keeps the existing generated models, DAO methods and query watches
|
||||||
/// while moving connection, encryption and storage ownership into Rust.
|
/// while moving connection, encryption and storage ownership into Rust.
|
||||||
QueryExecutor openRustAppDatabase() => DelegatedDatabase(
|
QueryExecutor openRustAppDatabase() => DelegatedDatabase(
|
||||||
_RustDatabaseDelegate(),
|
_RustDatabaseDelegate(),
|
||||||
isSequential: true,
|
isSequential: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
class _RustDatabaseDelegate extends DatabaseDelegate {
|
class _RustDatabaseDelegate extends DatabaseDelegate {
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:drift/drift.dart';
|
import 'package:drift/drift.dart';
|
||||||
|
|
||||||
|
|
||||||
enum SignalVersion { v1, v2 }
|
enum SignalVersion { v1, v2 }
|
||||||
|
|
||||||
@DataClassName('Contact')
|
@DataClassName('Contact')
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@ class Labels extends Table {
|
||||||
@DataClassName('ContactLabel')
|
@DataClassName('ContactLabel')
|
||||||
class ContactLabels extends Table {
|
class ContactLabels extends Table {
|
||||||
IntColumn get contactId => integer().references(
|
IntColumn get contactId => integer().references(
|
||||||
Contacts,
|
Contacts,
|
||||||
#userId,
|
#userId,
|
||||||
onDelete: KeyAction.cascade,
|
onDelete: KeyAction.cascade,
|
||||||
)();
|
)();
|
||||||
IntColumn get labelId => integer().references(
|
IntColumn get labelId => integer().references(
|
||||||
Labels,
|
Labels,
|
||||||
#id,
|
#id,
|
||||||
onDelete: KeyAction.cascade,
|
onDelete: KeyAction.cascade,
|
||||||
)();
|
)();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Set<Column> get primaryKey => {contactId, labelId};
|
Set<Column> get primaryKey => {contactId, labelId};
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@ import 'package:twonly/src/database/tables/mediafiles.table.dart';
|
||||||
enum MessageType { media, text, contacts, restoreFlameCounter, askAboutUser }
|
enum MessageType { media, text, contacts, restoreFlameCounter, askAboutUser }
|
||||||
|
|
||||||
@DataClassName('Message')
|
@DataClassName('Message')
|
||||||
@TableIndex(name: 'idx_messages_group_id_created_at', columns: {#groupId, #createdAt})
|
@TableIndex(
|
||||||
|
name: 'idx_messages_group_id_created_at',
|
||||||
|
columns: {#groupId, #createdAt},
|
||||||
|
)
|
||||||
class Messages extends Table {
|
class Messages extends Table {
|
||||||
TextColumn get groupId =>
|
TextColumn get groupId =>
|
||||||
text().references(Groups, #groupId, onDelete: KeyAction.cascade)();
|
text().references(Groups, #groupId, onDelete: KeyAction.cascade)();
|
||||||
|
|
|
||||||
|
|
@ -12704,7 +12704,7 @@ final class $$ContactsTableReferences
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => MultiTypedResultKey.fromTable(
|
) => MultiTypedResultKey.fromTable(
|
||||||
db.messages,
|
db.messages,
|
||||||
aliasName: $_aliasNameGenerator(db.contacts.userId, db.messages.senderId),
|
aliasName: 'contacts__user_id__messages__sender_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messagesRefs {
|
$$MessagesTableProcessedTableManager get messagesRefs {
|
||||||
|
|
@ -12722,10 +12722,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$MessageHistoriesTable, List<MessageHistory>>
|
static MultiTypedResultKey<$MessageHistoriesTable, List<MessageHistory>>
|
||||||
_messageHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_messageHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.messageHistories,
|
db.messageHistories,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__message_histories__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.messageHistories.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessageHistoriesTableProcessedTableManager get messageHistoriesRefs {
|
$$MessageHistoriesTableProcessedTableManager get messageHistoriesRefs {
|
||||||
|
|
@ -12745,7 +12742,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$ReactionsTable, List<Reaction>>
|
static MultiTypedResultKey<$ReactionsTable, List<Reaction>>
|
||||||
_reactionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_reactionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.reactions,
|
db.reactions,
|
||||||
aliasName: $_aliasNameGenerator(db.contacts.userId, db.reactions.senderId),
|
aliasName: 'contacts__user_id__reactions__sender_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ReactionsTableProcessedTableManager get reactionsRefs {
|
$$ReactionsTableProcessedTableManager get reactionsRefs {
|
||||||
|
|
@ -12763,10 +12760,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$GroupMembersTable, List<GroupMember>>
|
static MultiTypedResultKey<$GroupMembersTable, List<GroupMember>>
|
||||||
_groupMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_groupMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.groupMembers,
|
db.groupMembers,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__group_members__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.groupMembers.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$GroupMembersTableProcessedTableManager get groupMembersRefs {
|
$$GroupMembersTableProcessedTableManager get groupMembersRefs {
|
||||||
|
|
@ -12785,7 +12779,7 @@ final class $$ContactsTableReferences
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => MultiTypedResultKey.fromTable(
|
) => MultiTypedResultKey.fromTable(
|
||||||
db.receipts,
|
db.receipts,
|
||||||
aliasName: $_aliasNameGenerator(db.contacts.userId, db.receipts.contactId),
|
aliasName: 'contacts__user_id__receipts__contact_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ReceiptsTableProcessedTableManager get receiptsRefs {
|
$$ReceiptsTableProcessedTableManager get receiptsRefs {
|
||||||
|
|
@ -12802,10 +12796,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$MessageActionsTable, List<MessageAction>>
|
static MultiTypedResultKey<$MessageActionsTable, List<MessageAction>>
|
||||||
_messageActionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_messageActionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.messageActions,
|
db.messageActions,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__message_actions__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.messageActions.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessageActionsTableProcessedTableManager get messageActionsRefs {
|
$$MessageActionsTableProcessedTableManager get messageActionsRefs {
|
||||||
|
|
@ -12823,10 +12814,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$GroupHistoriesTable, List<GroupHistory>>
|
static MultiTypedResultKey<$GroupHistoriesTable, List<GroupHistory>>
|
||||||
_groupHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_groupHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.groupHistories,
|
db.groupHistories,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__group_histories__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.groupHistories.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$GroupHistoriesTableProcessedTableManager get groupHistoriesRefs {
|
$$GroupHistoriesTableProcessedTableManager get groupHistoriesRefs {
|
||||||
|
|
@ -12848,10 +12836,8 @@ final class $$ContactsTableReferences
|
||||||
_userDiscoveryUserRelationsRefsTable(_$TwonlyDB db) =>
|
_userDiscoveryUserRelationsRefsTable(_$TwonlyDB db) =>
|
||||||
MultiTypedResultKey.fromTable(
|
MultiTypedResultKey.fromTable(
|
||||||
db.userDiscoveryUserRelations,
|
db.userDiscoveryUserRelations,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName:
|
||||||
db.contacts.userId,
|
'contacts__user_id__user_discovery_user_relations__from_contact_id',
|
||||||
db.userDiscoveryUserRelations.fromContactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$UserDiscoveryUserRelationsTableProcessedTableManager
|
$$UserDiscoveryUserRelationsTableProcessedTableManager
|
||||||
|
|
@ -12877,14 +12863,13 @@ final class $$ContactsTableReferences
|
||||||
$UserDiscoveryOtherPromotionsTable,
|
$UserDiscoveryOtherPromotionsTable,
|
||||||
List<UserDiscoveryOtherPromotion>
|
List<UserDiscoveryOtherPromotion>
|
||||||
>
|
>
|
||||||
_userDiscoveryOtherPromotionsRefsTable(_$TwonlyDB db) =>
|
_userDiscoveryOtherPromotionsRefsTable(
|
||||||
MultiTypedResultKey.fromTable(
|
_$TwonlyDB db,
|
||||||
db.userDiscoveryOtherPromotions,
|
) => MultiTypedResultKey.fromTable(
|
||||||
aliasName: $_aliasNameGenerator(
|
db.userDiscoveryOtherPromotions,
|
||||||
db.contacts.userId,
|
aliasName:
|
||||||
db.userDiscoveryOtherPromotions.fromContactId,
|
'contacts__user_id__user_discovery_other_promotions__from_contact_id',
|
||||||
),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
$$UserDiscoveryOtherPromotionsTableProcessedTableManager
|
$$UserDiscoveryOtherPromotionsTableProcessedTableManager
|
||||||
get userDiscoveryOtherPromotionsRefs {
|
get userDiscoveryOtherPromotionsRefs {
|
||||||
|
|
@ -12912,10 +12897,8 @@ final class $$ContactsTableReferences
|
||||||
_userDiscoveryOwnPromotionsRefsTable(_$TwonlyDB db) =>
|
_userDiscoveryOwnPromotionsRefsTable(_$TwonlyDB db) =>
|
||||||
MultiTypedResultKey.fromTable(
|
MultiTypedResultKey.fromTable(
|
||||||
db.userDiscoveryOwnPromotions,
|
db.userDiscoveryOwnPromotions,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName:
|
||||||
db.contacts.userId,
|
'contacts__user_id__user_discovery_own_promotions__contact_id',
|
||||||
db.userDiscoveryOwnPromotions.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$UserDiscoveryOwnPromotionsTableProcessedTableManager
|
$$UserDiscoveryOwnPromotionsTableProcessedTableManager
|
||||||
|
|
@ -12942,10 +12925,7 @@ final class $$ContactsTableReferences
|
||||||
>
|
>
|
||||||
_userDiscoverySharesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_userDiscoverySharesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.userDiscoveryShares,
|
db.userDiscoveryShares,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__user_discovery_shares__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.userDiscoveryShares.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$UserDiscoverySharesTableProcessedTableManager get userDiscoverySharesRefs {
|
$$UserDiscoverySharesTableProcessedTableManager get userDiscoverySharesRefs {
|
||||||
|
|
@ -12968,10 +12948,7 @@ final class $$ContactsTableReferences
|
||||||
static MultiTypedResultKey<$ContactLabelsTable, List<ContactLabel>>
|
static MultiTypedResultKey<$ContactLabelsTable, List<ContactLabel>>
|
||||||
_contactLabelsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_contactLabelsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.contactLabels,
|
db.contactLabels,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'contacts__user_id__contact_labels__contact_id',
|
||||||
db.contacts.userId,
|
|
||||||
db.contactLabels.contactId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ContactLabelsTableProcessedTableManager get contactLabelsRefs {
|
$$ContactLabelsTableProcessedTableManager get contactLabelsRefs {
|
||||||
|
|
@ -14574,7 +14551,7 @@ final class $$GroupsTableReferences
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => MultiTypedResultKey.fromTable(
|
) => MultiTypedResultKey.fromTable(
|
||||||
db.messages,
|
db.messages,
|
||||||
aliasName: $_aliasNameGenerator(db.groups.groupId, db.messages.groupId),
|
aliasName: 'groups__group_id__messages__group_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messagesRefs {
|
$$MessagesTableProcessedTableManager get messagesRefs {
|
||||||
|
|
@ -14591,7 +14568,7 @@ final class $$GroupsTableReferences
|
||||||
static MultiTypedResultKey<$GroupMembersTable, List<GroupMember>>
|
static MultiTypedResultKey<$GroupMembersTable, List<GroupMember>>
|
||||||
_groupMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_groupMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.groupMembers,
|
db.groupMembers,
|
||||||
aliasName: $_aliasNameGenerator(db.groups.groupId, db.groupMembers.groupId),
|
aliasName: 'groups__group_id__group_members__group_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$GroupMembersTableProcessedTableManager get groupMembersRefs {
|
$$GroupMembersTableProcessedTableManager get groupMembersRefs {
|
||||||
|
|
@ -14609,10 +14586,7 @@ final class $$GroupsTableReferences
|
||||||
static MultiTypedResultKey<$GroupHistoriesTable, List<GroupHistory>>
|
static MultiTypedResultKey<$GroupHistoriesTable, List<GroupHistory>>
|
||||||
_groupHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_groupHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.groupHistories,
|
db.groupHistories,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'groups__group_id__group_histories__group_id',
|
||||||
db.groups.groupId,
|
|
||||||
db.groupHistories.groupId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$GroupHistoriesTableProcessedTableManager get groupHistoriesRefs {
|
$$GroupHistoriesTableProcessedTableManager get groupHistoriesRefs {
|
||||||
|
|
@ -14630,10 +14604,7 @@ final class $$GroupsTableReferences
|
||||||
static MultiTypedResultKey<$ShortcutMembersTable, List<ShortcutMember>>
|
static MultiTypedResultKey<$ShortcutMembersTable, List<ShortcutMember>>
|
||||||
_shortcutMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_shortcutMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.shortcutMembers,
|
db.shortcutMembers,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'groups__group_id__shortcut_members__group_id',
|
||||||
db.groups.groupId,
|
|
||||||
db.shortcutMembers.groupId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ShortcutMembersTableProcessedTableManager get shortcutMembersRefs {
|
$$ShortcutMembersTableProcessedTableManager get shortcutMembersRefs {
|
||||||
|
|
@ -15587,7 +15558,7 @@ final class $$MediaFilesTableReferences
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => MultiTypedResultKey.fromTable(
|
) => MultiTypedResultKey.fromTable(
|
||||||
db.messages,
|
db.messages,
|
||||||
aliasName: $_aliasNameGenerator(db.mediaFiles.mediaId, db.messages.mediaId),
|
aliasName: 'media_files__media_id__messages__media_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messagesRefs {
|
$$MessagesTableProcessedTableManager get messagesRefs {
|
||||||
|
|
@ -16282,9 +16253,8 @@ final class $$MessagesTableReferences
|
||||||
extends BaseReferences<_$TwonlyDB, $MessagesTable, Message> {
|
extends BaseReferences<_$TwonlyDB, $MessagesTable, Message> {
|
||||||
$$MessagesTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
$$MessagesTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
||||||
|
|
||||||
static $GroupsTable _groupIdTable(_$TwonlyDB db) => db.groups.createAlias(
|
static $GroupsTable _groupIdTable(_$TwonlyDB db) =>
|
||||||
$_aliasNameGenerator(db.messages.groupId, db.groups.groupId),
|
db.groups.createAlias('messages__group_id__groups__group_id');
|
||||||
);
|
|
||||||
|
|
||||||
$$GroupsTableProcessedTableManager get groupId {
|
$$GroupsTableProcessedTableManager get groupId {
|
||||||
final $_column = $_itemColumn<String>('group_id')!;
|
final $_column = $_itemColumn<String>('group_id')!;
|
||||||
|
|
@ -16301,9 +16271,7 @@ final class $$MessagesTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _senderIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _senderIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('messages__sender_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.messages.senderId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get senderId {
|
$$ContactsTableProcessedTableManager? get senderId {
|
||||||
final $_column = $_itemColumn<int>('sender_id');
|
final $_column = $_itemColumn<int>('sender_id');
|
||||||
|
|
@ -16320,9 +16288,7 @@ final class $$MessagesTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $MediaFilesTable _mediaIdTable(_$TwonlyDB db) =>
|
static $MediaFilesTable _mediaIdTable(_$TwonlyDB db) =>
|
||||||
db.mediaFiles.createAlias(
|
db.mediaFiles.createAlias('messages__media_id__media_files__media_id');
|
||||||
$_aliasNameGenerator(db.messages.mediaId, db.mediaFiles.mediaId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$MediaFilesTableProcessedTableManager? get mediaId {
|
$$MediaFilesTableProcessedTableManager? get mediaId {
|
||||||
final $_column = $_itemColumn<String>('media_id');
|
final $_column = $_itemColumn<String>('media_id');
|
||||||
|
|
@ -16341,10 +16307,7 @@ final class $$MessagesTableReferences
|
||||||
static MultiTypedResultKey<$MessageHistoriesTable, List<MessageHistory>>
|
static MultiTypedResultKey<$MessageHistoriesTable, List<MessageHistory>>
|
||||||
_messageHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_messageHistoriesRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.messageHistories,
|
db.messageHistories,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'messages__message_id__message_histories__message_id',
|
||||||
db.messages.messageId,
|
|
||||||
db.messageHistories.messageId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessageHistoriesTableProcessedTableManager get messageHistoriesRefs {
|
$$MessageHistoriesTableProcessedTableManager get messageHistoriesRefs {
|
||||||
|
|
@ -16366,10 +16329,7 @@ final class $$MessagesTableReferences
|
||||||
static MultiTypedResultKey<$ReactionsTable, List<Reaction>>
|
static MultiTypedResultKey<$ReactionsTable, List<Reaction>>
|
||||||
_reactionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_reactionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.reactions,
|
db.reactions,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'messages__message_id__reactions__message_id',
|
||||||
db.messages.messageId,
|
|
||||||
db.reactions.messageId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ReactionsTableProcessedTableManager get reactionsRefs {
|
$$ReactionsTableProcessedTableManager get reactionsRefs {
|
||||||
|
|
@ -16388,10 +16348,7 @@ final class $$MessagesTableReferences
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => MultiTypedResultKey.fromTable(
|
) => MultiTypedResultKey.fromTable(
|
||||||
db.receipts,
|
db.receipts,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'messages__message_id__receipts__message_id',
|
||||||
db.messages.messageId,
|
|
||||||
db.receipts.messageId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ReceiptsTableProcessedTableManager get receiptsRefs {
|
$$ReceiptsTableProcessedTableManager get receiptsRefs {
|
||||||
|
|
@ -16409,10 +16366,7 @@ final class $$MessagesTableReferences
|
||||||
static MultiTypedResultKey<$MessageActionsTable, List<MessageAction>>
|
static MultiTypedResultKey<$MessageActionsTable, List<MessageAction>>
|
||||||
_messageActionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_messageActionsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.messageActions,
|
db.messageActions,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'messages__message_id__message_actions__message_id',
|
||||||
db.messages.messageId,
|
|
||||||
db.messageActions.messageId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$MessageActionsTableProcessedTableManager get messageActionsRefs {
|
$$MessageActionsTableProcessedTableManager get messageActionsRefs {
|
||||||
|
|
@ -17423,13 +17377,8 @@ final class $$MessageHistoriesTableReferences
|
||||||
super.$_typedResult,
|
super.$_typedResult,
|
||||||
);
|
);
|
||||||
|
|
||||||
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
static $MessagesTable _messageIdTable(_$TwonlyDB db) => db.messages
|
||||||
db.messages.createAlias(
|
.createAlias('message_histories__message_id__messages__message_id');
|
||||||
$_aliasNameGenerator(
|
|
||||||
db.messageHistories.messageId,
|
|
||||||
db.messages.messageId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messageId {
|
$$MessagesTableProcessedTableManager get messageId {
|
||||||
final $_column = $_itemColumn<String>('message_id')!;
|
final $_column = $_itemColumn<String>('message_id')!;
|
||||||
|
|
@ -17445,10 +17394,8 @@ final class $$MessageHistoriesTableReferences
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) => db.contacts
|
||||||
db.contacts.createAlias(
|
.createAlias('message_histories__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.messageHistories.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get contactId {
|
$$ContactsTableProcessedTableManager? get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id');
|
final $_column = $_itemColumn<int>('contact_id');
|
||||||
|
|
@ -17834,9 +17781,7 @@ final class $$ReactionsTableReferences
|
||||||
$$ReactionsTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
$$ReactionsTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
||||||
|
|
||||||
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
||||||
db.messages.createAlias(
|
db.messages.createAlias('reactions__message_id__messages__message_id');
|
||||||
$_aliasNameGenerator(db.reactions.messageId, db.messages.messageId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messageId {
|
$$MessagesTableProcessedTableManager get messageId {
|
||||||
final $_column = $_itemColumn<String>('message_id')!;
|
final $_column = $_itemColumn<String>('message_id')!;
|
||||||
|
|
@ -17853,9 +17798,7 @@ final class $$ReactionsTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _senderIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _senderIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('reactions__sender_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.reactions.senderId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get senderId {
|
$$ContactsTableProcessedTableManager? get senderId {
|
||||||
final $_column = $_itemColumn<int>('sender_id');
|
final $_column = $_itemColumn<int>('sender_id');
|
||||||
|
|
@ -18229,9 +18172,8 @@ final class $$GroupMembersTableReferences
|
||||||
extends BaseReferences<_$TwonlyDB, $GroupMembersTable, GroupMember> {
|
extends BaseReferences<_$TwonlyDB, $GroupMembersTable, GroupMember> {
|
||||||
$$GroupMembersTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
$$GroupMembersTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
||||||
|
|
||||||
static $GroupsTable _groupIdTable(_$TwonlyDB db) => db.groups.createAlias(
|
static $GroupsTable _groupIdTable(_$TwonlyDB db) =>
|
||||||
$_aliasNameGenerator(db.groupMembers.groupId, db.groups.groupId),
|
db.groups.createAlias('group_members__group_id__groups__group_id');
|
||||||
);
|
|
||||||
|
|
||||||
$$GroupsTableProcessedTableManager get groupId {
|
$$GroupsTableProcessedTableManager get groupId {
|
||||||
final $_column = $_itemColumn<String>('group_id')!;
|
final $_column = $_itemColumn<String>('group_id')!;
|
||||||
|
|
@ -18248,9 +18190,7 @@ final class $$GroupMembersTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('group_members__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.groupMembers.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id')!;
|
final $_column = $_itemColumn<int>('contact_id')!;
|
||||||
|
|
@ -18713,9 +18653,7 @@ final class $$ReceiptsTableReferences
|
||||||
$$ReceiptsTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
$$ReceiptsTableReferences(super.$_db, super.$_table, super.$_typedResult);
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('receipts__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.receipts.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id')!;
|
final $_column = $_itemColumn<int>('contact_id')!;
|
||||||
|
|
@ -18732,9 +18670,7 @@ final class $$ReceiptsTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
||||||
db.messages.createAlias(
|
db.messages.createAlias('receipts__message_id__messages__message_id');
|
||||||
$_aliasNameGenerator(db.receipts.messageId, db.messages.messageId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager? get messageId {
|
$$MessagesTableProcessedTableManager? get messageId {
|
||||||
final $_column = $_itemColumn<String>('message_id');
|
final $_column = $_itemColumn<String>('message_id');
|
||||||
|
|
@ -19399,13 +19335,8 @@ final class $$MessageActionsTableReferences
|
||||||
super.$_typedResult,
|
super.$_typedResult,
|
||||||
);
|
);
|
||||||
|
|
||||||
static $MessagesTable _messageIdTable(_$TwonlyDB db) =>
|
static $MessagesTable _messageIdTable(_$TwonlyDB db) => db.messages
|
||||||
db.messages.createAlias(
|
.createAlias('message_actions__message_id__messages__message_id');
|
||||||
$_aliasNameGenerator(
|
|
||||||
db.messageActions.messageId,
|
|
||||||
db.messages.messageId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$MessagesTableProcessedTableManager get messageId {
|
$$MessagesTableProcessedTableManager get messageId {
|
||||||
final $_column = $_itemColumn<String>('message_id')!;
|
final $_column = $_itemColumn<String>('message_id')!;
|
||||||
|
|
@ -19422,9 +19353,7 @@ final class $$MessageActionsTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('message_actions__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.messageActions.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id')!;
|
final $_column = $_itemColumn<int>('contact_id')!;
|
||||||
|
|
@ -19807,9 +19736,8 @@ final class $$GroupHistoriesTableReferences
|
||||||
super.$_typedResult,
|
super.$_typedResult,
|
||||||
);
|
);
|
||||||
|
|
||||||
static $GroupsTable _groupIdTable(_$TwonlyDB db) => db.groups.createAlias(
|
static $GroupsTable _groupIdTable(_$TwonlyDB db) =>
|
||||||
$_aliasNameGenerator(db.groupHistories.groupId, db.groups.groupId),
|
db.groups.createAlias('group_histories__group_id__groups__group_id');
|
||||||
);
|
|
||||||
|
|
||||||
$$GroupsTableProcessedTableManager get groupId {
|
$$GroupsTableProcessedTableManager get groupId {
|
||||||
final $_column = $_itemColumn<String>('group_id')!;
|
final $_column = $_itemColumn<String>('group_id')!;
|
||||||
|
|
@ -19826,9 +19754,7 @@ final class $$GroupHistoriesTableReferences
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('group_histories__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.groupHistories.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get contactId {
|
$$ContactsTableProcessedTableManager? get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id');
|
final $_column = $_itemColumn<int>('contact_id');
|
||||||
|
|
@ -20304,10 +20230,8 @@ final class $$KeyVerificationsTableReferences
|
||||||
super.$_typedResult,
|
super.$_typedResult,
|
||||||
);
|
);
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) => db.contacts
|
||||||
db.contacts.createAlias(
|
.createAlias('key_verifications__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.keyVerifications.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id')!;
|
final $_column = $_itemColumn<int>('contact_id')!;
|
||||||
|
|
@ -20323,13 +20247,8 @@ final class $$KeyVerificationsTableReferences
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static $ContactsTable _verifiedByTable(_$TwonlyDB db) =>
|
static $ContactsTable _verifiedByTable(_$TwonlyDB db) => db.contacts
|
||||||
db.contacts.createAlias(
|
.createAlias('key_verifications__verified_by__contacts__user_id');
|
||||||
$_aliasNameGenerator(
|
|
||||||
db.keyVerifications.verifiedBy,
|
|
||||||
db.contacts.userId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get verifiedBy {
|
$$ContactsTableProcessedTableManager? get verifiedBy {
|
||||||
final $_column = $_itemColumn<int>('verified_by');
|
final $_column = $_itemColumn<int>('verified_by');
|
||||||
|
|
@ -20899,14 +20818,13 @@ final class $$UserDiscoveryAnnouncedUsersTableReferences
|
||||||
$UserDiscoveryUserRelationsTable,
|
$UserDiscoveryUserRelationsTable,
|
||||||
List<UserDiscoveryUserRelation>
|
List<UserDiscoveryUserRelation>
|
||||||
>
|
>
|
||||||
_userDiscoveryUserRelationsRefsTable(_$TwonlyDB db) =>
|
_userDiscoveryUserRelationsRefsTable(
|
||||||
MultiTypedResultKey.fromTable(
|
_$TwonlyDB db,
|
||||||
db.userDiscoveryUserRelations,
|
) => MultiTypedResultKey.fromTable(
|
||||||
aliasName: $_aliasNameGenerator(
|
db.userDiscoveryUserRelations,
|
||||||
db.userDiscoveryAnnouncedUsers.announcedUserId,
|
aliasName:
|
||||||
db.userDiscoveryUserRelations.announcedUserId,
|
'user_discovery_announced_users__announced_user_id__user_discovery_user_relations__announced_user_id',
|
||||||
),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
$$UserDiscoveryUserRelationsTableProcessedTableManager
|
$$UserDiscoveryUserRelationsTableProcessedTableManager
|
||||||
get userDiscoveryUserRelationsRefs {
|
get userDiscoveryUserRelationsRefs {
|
||||||
|
|
@ -21286,10 +21204,7 @@ final class $$UserDiscoveryUserRelationsTableReferences
|
||||||
static $UserDiscoveryAnnouncedUsersTable _announcedUserIdTable(
|
static $UserDiscoveryAnnouncedUsersTable _announcedUserIdTable(
|
||||||
_$TwonlyDB db,
|
_$TwonlyDB db,
|
||||||
) => db.userDiscoveryAnnouncedUsers.createAlias(
|
) => db.userDiscoveryAnnouncedUsers.createAlias(
|
||||||
$_aliasNameGenerator(
|
'user_discovery_user_relations__announced_user_id__user_discovery_announced_users__announced_user_id',
|
||||||
db.userDiscoveryUserRelations.announcedUserId,
|
|
||||||
db.userDiscoveryAnnouncedUsers.announcedUserId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$UserDiscoveryAnnouncedUsersTableProcessedTableManager get announcedUserId {
|
$$UserDiscoveryAnnouncedUsersTableProcessedTableManager get announcedUserId {
|
||||||
|
|
@ -21308,10 +21223,7 @@ final class $$UserDiscoveryUserRelationsTableReferences
|
||||||
|
|
||||||
static $ContactsTable _fromContactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _fromContactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias(
|
||||||
$_aliasNameGenerator(
|
'user_discovery_user_relations__from_contact_id__contacts__user_id',
|
||||||
db.userDiscoveryUserRelations.fromContactId,
|
|
||||||
db.contacts.userId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get fromContactId {
|
$$ContactsTableProcessedTableManager get fromContactId {
|
||||||
|
|
@ -21703,10 +21615,7 @@ final class $$UserDiscoveryOtherPromotionsTableReferences
|
||||||
|
|
||||||
static $ContactsTable _fromContactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _fromContactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias(
|
||||||
$_aliasNameGenerator(
|
'user_discovery_other_promotions__from_contact_id__contacts__user_id',
|
||||||
db.userDiscoveryOtherPromotions.fromContactId,
|
|
||||||
db.contacts.userId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get fromContactId {
|
$$ContactsTableProcessedTableManager get fromContactId {
|
||||||
|
|
@ -22074,10 +21983,7 @@ final class $$UserDiscoveryOwnPromotionsTableReferences
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias(
|
||||||
$_aliasNameGenerator(
|
'user_discovery_own_promotions__contact_id__contacts__user_id',
|
||||||
db.userDiscoveryOwnPromotions.contactId,
|
|
||||||
db.contacts.userId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
|
|
@ -22375,13 +22281,8 @@ final class $$UserDiscoverySharesTableReferences
|
||||||
super.$_typedResult,
|
super.$_typedResult,
|
||||||
);
|
);
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) => db.contacts
|
||||||
db.contacts.createAlias(
|
.createAlias('user_discovery_shares__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(
|
|
||||||
db.userDiscoveryShares.contactId,
|
|
||||||
db.contacts.userId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager? get contactId {
|
$$ContactsTableProcessedTableManager? get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id');
|
final $_column = $_itemColumn<int>('contact_id');
|
||||||
|
|
@ -22666,10 +22567,7 @@ final class $$ShortcutsTableReferences
|
||||||
static MultiTypedResultKey<$ShortcutMembersTable, List<ShortcutMember>>
|
static MultiTypedResultKey<$ShortcutMembersTable, List<ShortcutMember>>
|
||||||
_shortcutMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_shortcutMembersRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.shortcutMembers,
|
db.shortcutMembers,
|
||||||
aliasName: $_aliasNameGenerator(
|
aliasName: 'shortcuts__id__shortcut_members__shortcut_id',
|
||||||
db.shortcuts.id,
|
|
||||||
db.shortcutMembers.shortcutId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ShortcutMembersTableProcessedTableManager get shortcutMembersRefs {
|
$$ShortcutMembersTableProcessedTableManager get shortcutMembersRefs {
|
||||||
|
|
@ -22934,9 +22832,7 @@ final class $$ShortcutMembersTableReferences
|
||||||
);
|
);
|
||||||
|
|
||||||
static $ShortcutsTable _shortcutIdTable(_$TwonlyDB db) =>
|
static $ShortcutsTable _shortcutIdTable(_$TwonlyDB db) =>
|
||||||
db.shortcuts.createAlias(
|
db.shortcuts.createAlias('shortcut_members__shortcut_id__shortcuts__id');
|
||||||
$_aliasNameGenerator(db.shortcutMembers.shortcutId, db.shortcuts.id),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ShortcutsTableProcessedTableManager get shortcutId {
|
$$ShortcutsTableProcessedTableManager get shortcutId {
|
||||||
final $_column = $_itemColumn<int>('shortcut_id')!;
|
final $_column = $_itemColumn<int>('shortcut_id')!;
|
||||||
|
|
@ -22952,9 +22848,8 @@ final class $$ShortcutMembersTableReferences
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static $GroupsTable _groupIdTable(_$TwonlyDB db) => db.groups.createAlias(
|
static $GroupsTable _groupIdTable(_$TwonlyDB db) =>
|
||||||
$_aliasNameGenerator(db.shortcutMembers.groupId, db.groups.groupId),
|
db.groups.createAlias('shortcut_members__group_id__groups__group_id');
|
||||||
);
|
|
||||||
|
|
||||||
$$GroupsTableProcessedTableManager get groupId {
|
$$GroupsTableProcessedTableManager get groupId {
|
||||||
final $_column = $_itemColumn<String>('group_id')!;
|
final $_column = $_itemColumn<String>('group_id')!;
|
||||||
|
|
@ -23293,7 +23188,7 @@ final class $$LabelsTableReferences
|
||||||
static MultiTypedResultKey<$ContactLabelsTable, List<ContactLabel>>
|
static MultiTypedResultKey<$ContactLabelsTable, List<ContactLabel>>
|
||||||
_contactLabelsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
_contactLabelsRefsTable(_$TwonlyDB db) => MultiTypedResultKey.fromTable(
|
||||||
db.contactLabels,
|
db.contactLabels,
|
||||||
aliasName: $_aliasNameGenerator(db.labels.id, db.contactLabels.labelId),
|
aliasName: 'labels__id__contact_labels__label_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$$ContactLabelsTableProcessedTableManager get contactLabelsRefs {
|
$$ContactLabelsTableProcessedTableManager get contactLabelsRefs {
|
||||||
|
|
@ -23585,9 +23480,7 @@ final class $$ContactLabelsTableReferences
|
||||||
);
|
);
|
||||||
|
|
||||||
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
static $ContactsTable _contactIdTable(_$TwonlyDB db) =>
|
||||||
db.contacts.createAlias(
|
db.contacts.createAlias('contact_labels__contact_id__contacts__user_id');
|
||||||
$_aliasNameGenerator(db.contactLabels.contactId, db.contacts.userId),
|
|
||||||
);
|
|
||||||
|
|
||||||
$$ContactsTableProcessedTableManager get contactId {
|
$$ContactsTableProcessedTableManager get contactId {
|
||||||
final $_column = $_itemColumn<int>('contact_id')!;
|
final $_column = $_itemColumn<int>('contact_id')!;
|
||||||
|
|
@ -23603,9 +23496,8 @@ final class $$ContactLabelsTableReferences
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static $LabelsTable _labelIdTable(_$TwonlyDB db) => db.labels.createAlias(
|
static $LabelsTable _labelIdTable(_$TwonlyDB db) =>
|
||||||
$_aliasNameGenerator(db.contactLabels.labelId, db.labels.id),
|
db.labels.createAlias('contact_labels__label_id__labels__id');
|
||||||
);
|
|
||||||
|
|
||||||
$$LabelsTableProcessedTableManager get labelId {
|
$$LabelsTableProcessedTableManager get labelId {
|
||||||
final $_column = $_itemColumn<int>('label_id')!;
|
final $_column = $_itemColumn<int>('label_id')!;
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,146 @@ class UploadRequest extends $pb.GeneratedMessage {
|
||||||
$pb.PbList<TextMessage> get messagesOnSuccess => $_getList(2);
|
$pb.PbList<TextMessage> get messagesOnSuccess => $_getList(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SealedSenderMessageRequest extends $pb.GeneratedMessage {
|
||||||
|
factory SealedSenderMessageRequest({
|
||||||
|
$fixnum.Int64? recipientUserId,
|
||||||
|
$core.List<$core.int>? sealedSenderMessage,
|
||||||
|
$core.List<$core.int>? privacyPassToken,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (recipientUserId != null) result.recipientUserId = recipientUserId;
|
||||||
|
if (sealedSenderMessage != null)
|
||||||
|
result.sealedSenderMessage = sealedSenderMessage;
|
||||||
|
if (privacyPassToken != null) result.privacyPassToken = privacyPassToken;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
SealedSenderMessageRequest._();
|
||||||
|
|
||||||
|
factory SealedSenderMessageRequest.fromBuffer($core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory SealedSenderMessageRequest.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'SealedSenderMessageRequest',
|
||||||
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'http_requests'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..aInt64(1, _omitFieldNames ? '' : 'recipientUserId')
|
||||||
|
..a<$core.List<$core.int>>(
|
||||||
|
2, _omitFieldNames ? '' : 'sealedSenderMessage', $pb.PbFieldType.OY)
|
||||||
|
..a<$core.List<$core.int>>(
|
||||||
|
3, _omitFieldNames ? '' : 'privacyPassToken', $pb.PbFieldType.OY)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessageRequest clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessageRequest copyWith(
|
||||||
|
void Function(SealedSenderMessageRequest) updates) =>
|
||||||
|
super.copyWith(
|
||||||
|
(message) => updates(message as SealedSenderMessageRequest))
|
||||||
|
as SealedSenderMessageRequest;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessageRequest create() => SealedSenderMessageRequest._();
|
||||||
|
@$core.override
|
||||||
|
SealedSenderMessageRequest createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessageRequest getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<SealedSenderMessageRequest>(create);
|
||||||
|
static SealedSenderMessageRequest? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$fixnum.Int64 get recipientUserId => $_getI64(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
set recipientUserId($fixnum.Int64 value) => $_setInt64(0, value);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.bool hasRecipientUserId() => $_has(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
void clearRecipientUserId() => $_clearField(1);
|
||||||
|
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.List<$core.int> get sealedSenderMessage => $_getN(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
set sealedSenderMessage($core.List<$core.int> value) => $_setBytes(1, value);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.bool hasSealedSenderMessage() => $_has(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
void clearSealedSenderMessage() => $_clearField(2);
|
||||||
|
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.List<$core.int> get privacyPassToken => $_getN(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
set privacyPassToken($core.List<$core.int> value) => $_setBytes(2, value);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.bool hasPrivacyPassToken() => $_has(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
void clearPrivacyPassToken() => $_clearField(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SealedSenderMessageResponse extends $pb.GeneratedMessage {
|
||||||
|
factory SealedSenderMessageResponse({
|
||||||
|
$core.String? messageId,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (messageId != null) result.messageId = messageId;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
SealedSenderMessageResponse._();
|
||||||
|
|
||||||
|
factory SealedSenderMessageResponse.fromBuffer($core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory SealedSenderMessageResponse.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'SealedSenderMessageResponse',
|
||||||
|
package: const $pb.PackageName(_omitMessageNames ? '' : 'http_requests'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..aOS(1, _omitFieldNames ? '' : 'messageId')
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessageResponse clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessageResponse copyWith(
|
||||||
|
void Function(SealedSenderMessageResponse) updates) =>
|
||||||
|
super.copyWith(
|
||||||
|
(message) => updates(message as SealedSenderMessageResponse))
|
||||||
|
as SealedSenderMessageResponse;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessageResponse create() =>
|
||||||
|
SealedSenderMessageResponse._();
|
||||||
|
@$core.override
|
||||||
|
SealedSenderMessageResponse createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessageResponse getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<SealedSenderMessageResponse>(create);
|
||||||
|
static SealedSenderMessageResponse? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.String get messageId => $_getSZ(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
set messageId($core.String value) => $_setString(0, value);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.bool hasMessageId() => $_has(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
void clearMessageId() => $_clearField(1);
|
||||||
|
}
|
||||||
|
|
||||||
class UpdateGroupState_UpdateTBS extends $pb.GeneratedMessage {
|
class UpdateGroupState_UpdateTBS extends $pb.GeneratedMessage {
|
||||||
factory UpdateGroupState_UpdateTBS({
|
factory UpdateGroupState_UpdateTBS({
|
||||||
$fixnum.Int64? versionId,
|
$fixnum.Int64? versionId,
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,52 @@ final $typed_data.Uint8List uploadRequestDescriptor = $convert.base64Decode(
|
||||||
'c3VjY2VzcxgDIAMoCzIaLmh0dHBfcmVxdWVzdHMuVGV4dE1lc3NhZ2VSEW1lc3NhZ2VzT25TdW'
|
'c3VjY2VzcxgDIAMoCzIaLmh0dHBfcmVxdWVzdHMuVGV4dE1lc3NhZ2VSEW1lc3NhZ2VzT25TdW'
|
||||||
'NjZXNz');
|
'NjZXNz');
|
||||||
|
|
||||||
|
@$core.Deprecated('Use sealedSenderMessageRequestDescriptor instead')
|
||||||
|
const SealedSenderMessageRequest$json = {
|
||||||
|
'1': 'SealedSenderMessageRequest',
|
||||||
|
'2': [
|
||||||
|
{'1': 'recipient_user_id', '3': 1, '4': 1, '5': 3, '10': 'recipientUserId'},
|
||||||
|
{
|
||||||
|
'1': 'sealed_sender_message',
|
||||||
|
'3': 2,
|
||||||
|
'4': 1,
|
||||||
|
'5': 12,
|
||||||
|
'10': 'sealedSenderMessage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'1': 'privacy_pass_token',
|
||||||
|
'3': 3,
|
||||||
|
'4': 1,
|
||||||
|
'5': 12,
|
||||||
|
'10': 'privacyPassToken'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'9': [
|
||||||
|
{'1': 4, '2': 5},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Descriptor for `SealedSenderMessageRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
|
final $typed_data.Uint8List sealedSenderMessageRequestDescriptor = $convert.base64Decode(
|
||||||
|
'ChpTZWFsZWRTZW5kZXJNZXNzYWdlUmVxdWVzdBIqChFyZWNpcGllbnRfdXNlcl9pZBgBIAEoA1'
|
||||||
|
'IPcmVjaXBpZW50VXNlcklkEjIKFXNlYWxlZF9zZW5kZXJfbWVzc2FnZRgCIAEoDFITc2VhbGVk'
|
||||||
|
'U2VuZGVyTWVzc2FnZRIsChJwcml2YWN5X3Bhc3NfdG9rZW4YAyABKAxSEHByaXZhY3lQYXNzVG'
|
||||||
|
'9rZW5KBAgEEAU=');
|
||||||
|
|
||||||
|
@$core.Deprecated('Use sealedSenderMessageResponseDescriptor instead')
|
||||||
|
const SealedSenderMessageResponse$json = {
|
||||||
|
'1': 'SealedSenderMessageResponse',
|
||||||
|
'2': [
|
||||||
|
{'1': 'message_id', '3': 1, '4': 1, '5': 9, '10': 'messageId'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Descriptor for `SealedSenderMessageResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
|
final $typed_data.Uint8List sealedSenderMessageResponseDescriptor =
|
||||||
|
$convert.base64Decode(
|
||||||
|
'ChtTZWFsZWRTZW5kZXJNZXNzYWdlUmVzcG9uc2USHQoKbWVzc2FnZV9pZBgBIAEoCVIJbWVzc2'
|
||||||
|
'FnZUlk');
|
||||||
|
|
||||||
@$core.Deprecated('Use updateGroupStateDescriptor instead')
|
@$core.Deprecated('Use updateGroupStateDescriptor instead')
|
||||||
const UpdateGroupState$json = {
|
const UpdateGroupState$json = {
|
||||||
'1': 'UpdateGroupState',
|
'1': 'UpdateGroupState',
|
||||||
|
|
|
||||||
|
|
@ -3301,6 +3301,105 @@ class ApplicationData_DisableMemoriesBackup extends $pb.GeneratedMessage {
|
||||||
static ApplicationData_DisableMemoriesBackup? _defaultInstance;
|
static ApplicationData_DisableMemoriesBackup? _defaultInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ApplicationData_GetPrivacyPassParameters extends $pb.GeneratedMessage {
|
||||||
|
factory ApplicationData_GetPrivacyPassParameters() => create();
|
||||||
|
|
||||||
|
ApplicationData_GetPrivacyPassParameters._();
|
||||||
|
|
||||||
|
factory ApplicationData_GetPrivacyPassParameters.fromBuffer(
|
||||||
|
$core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory ApplicationData_GetPrivacyPassParameters.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'ApplicationData.GetPrivacyPassParameters',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
ApplicationData_GetPrivacyPassParameters clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
ApplicationData_GetPrivacyPassParameters copyWith(
|
||||||
|
void Function(ApplicationData_GetPrivacyPassParameters) updates) =>
|
||||||
|
super.copyWith((message) =>
|
||||||
|
updates(message as ApplicationData_GetPrivacyPassParameters))
|
||||||
|
as ApplicationData_GetPrivacyPassParameters;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static ApplicationData_GetPrivacyPassParameters create() =>
|
||||||
|
ApplicationData_GetPrivacyPassParameters._();
|
||||||
|
@$core.override
|
||||||
|
ApplicationData_GetPrivacyPassParameters createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static ApplicationData_GetPrivacyPassParameters getDefault() =>
|
||||||
|
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<
|
||||||
|
ApplicationData_GetPrivacyPassParameters>(create);
|
||||||
|
static ApplicationData_GetPrivacyPassParameters? _defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ApplicationData_IssuePrivacyPassTokens extends $pb.GeneratedMessage {
|
||||||
|
factory ApplicationData_IssuePrivacyPassTokens({
|
||||||
|
$core.Iterable<$core.List<$core.int>>? tokenRequests,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (tokenRequests != null) result.tokenRequests.addAll(tokenRequests);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplicationData_IssuePrivacyPassTokens._();
|
||||||
|
|
||||||
|
factory ApplicationData_IssuePrivacyPassTokens.fromBuffer(
|
||||||
|
$core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory ApplicationData_IssuePrivacyPassTokens.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'ApplicationData.IssuePrivacyPassTokens',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..p<$core.List<$core.int>>(
|
||||||
|
1, _omitFieldNames ? '' : 'tokenRequests', $pb.PbFieldType.PY)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
ApplicationData_IssuePrivacyPassTokens clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
ApplicationData_IssuePrivacyPassTokens copyWith(
|
||||||
|
void Function(ApplicationData_IssuePrivacyPassTokens) updates) =>
|
||||||
|
super.copyWith((message) =>
|
||||||
|
updates(message as ApplicationData_IssuePrivacyPassTokens))
|
||||||
|
as ApplicationData_IssuePrivacyPassTokens;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static ApplicationData_IssuePrivacyPassTokens create() =>
|
||||||
|
ApplicationData_IssuePrivacyPassTokens._();
|
||||||
|
@$core.override
|
||||||
|
ApplicationData_IssuePrivacyPassTokens createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static ApplicationData_IssuePrivacyPassTokens getDefault() =>
|
||||||
|
_defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<
|
||||||
|
ApplicationData_IssuePrivacyPassTokens>(create);
|
||||||
|
static ApplicationData_IssuePrivacyPassTokens? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$pb.PbList<$core.List<$core.int>> get tokenRequests => $_getList(0);
|
||||||
|
}
|
||||||
|
|
||||||
enum ApplicationData_ApplicationData {
|
enum ApplicationData_ApplicationData {
|
||||||
textMessage,
|
textMessage,
|
||||||
getUserByUsername,
|
getUserByUsername,
|
||||||
|
|
@ -3330,6 +3429,8 @@ enum ApplicationData_ApplicationData {
|
||||||
deleteMemory,
|
deleteMemory,
|
||||||
disableMemoriesBackup,
|
disableMemoriesBackup,
|
||||||
uploadPqcPrekeys,
|
uploadPqcPrekeys,
|
||||||
|
getPrivacyPassParameters,
|
||||||
|
issuePrivacyPassTokens,
|
||||||
notSet
|
notSet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3363,6 +3464,8 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
ApplicationData_DeleteMemory? deleteMemory,
|
ApplicationData_DeleteMemory? deleteMemory,
|
||||||
ApplicationData_DisableMemoriesBackup? disableMemoriesBackup,
|
ApplicationData_DisableMemoriesBackup? disableMemoriesBackup,
|
||||||
ApplicationData_UploadPqcPreKeys? uploadPqcPrekeys,
|
ApplicationData_UploadPqcPreKeys? uploadPqcPrekeys,
|
||||||
|
ApplicationData_GetPrivacyPassParameters? getPrivacyPassParameters,
|
||||||
|
ApplicationData_IssuePrivacyPassTokens? issuePrivacyPassTokens,
|
||||||
}) {
|
}) {
|
||||||
final result = create();
|
final result = create();
|
||||||
if (textMessage != null) result.textMessage = textMessage;
|
if (textMessage != null) result.textMessage = textMessage;
|
||||||
|
|
@ -3404,6 +3507,10 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
if (disableMemoriesBackup != null)
|
if (disableMemoriesBackup != null)
|
||||||
result.disableMemoriesBackup = disableMemoriesBackup;
|
result.disableMemoriesBackup = disableMemoriesBackup;
|
||||||
if (uploadPqcPrekeys != null) result.uploadPqcPrekeys = uploadPqcPrekeys;
|
if (uploadPqcPrekeys != null) result.uploadPqcPrekeys = uploadPqcPrekeys;
|
||||||
|
if (getPrivacyPassParameters != null)
|
||||||
|
result.getPrivacyPassParameters = getPrivacyPassParameters;
|
||||||
|
if (issuePrivacyPassTokens != null)
|
||||||
|
result.issuePrivacyPassTokens = issuePrivacyPassTokens;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3446,6 +3553,8 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
38: ApplicationData_ApplicationData.deleteMemory,
|
38: ApplicationData_ApplicationData.deleteMemory,
|
||||||
39: ApplicationData_ApplicationData.disableMemoriesBackup,
|
39: ApplicationData_ApplicationData.disableMemoriesBackup,
|
||||||
40: ApplicationData_ApplicationData.uploadPqcPrekeys,
|
40: ApplicationData_ApplicationData.uploadPqcPrekeys,
|
||||||
|
41: ApplicationData_ApplicationData.getPrivacyPassParameters,
|
||||||
|
42: ApplicationData_ApplicationData.issuePrivacyPassTokens,
|
||||||
0: ApplicationData_ApplicationData.notSet
|
0: ApplicationData_ApplicationData.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
|
@ -3481,7 +3590,9 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
37,
|
37,
|
||||||
38,
|
38,
|
||||||
39,
|
39,
|
||||||
40
|
40,
|
||||||
|
41,
|
||||||
|
42
|
||||||
])
|
])
|
||||||
..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textMessage',
|
..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textMessage',
|
||||||
protoName: 'textMessage',
|
protoName: 'textMessage',
|
||||||
|
|
@ -3579,6 +3690,12 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
..aOM<ApplicationData_UploadPqcPreKeys>(
|
..aOM<ApplicationData_UploadPqcPreKeys>(
|
||||||
40, _omitFieldNames ? '' : 'uploadPqcPrekeys',
|
40, _omitFieldNames ? '' : 'uploadPqcPrekeys',
|
||||||
subBuilder: ApplicationData_UploadPqcPreKeys.create)
|
subBuilder: ApplicationData_UploadPqcPreKeys.create)
|
||||||
|
..aOM<ApplicationData_GetPrivacyPassParameters>(
|
||||||
|
41, _omitFieldNames ? '' : 'getPrivacyPassParameters',
|
||||||
|
subBuilder: ApplicationData_GetPrivacyPassParameters.create)
|
||||||
|
..aOM<ApplicationData_IssuePrivacyPassTokens>(
|
||||||
|
42, _omitFieldNames ? '' : 'issuePrivacyPassTokens',
|
||||||
|
subBuilder: ApplicationData_IssuePrivacyPassTokens.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
|
@ -3628,6 +3745,8 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(38)
|
@$pb.TagNumber(38)
|
||||||
@$pb.TagNumber(39)
|
@$pb.TagNumber(39)
|
||||||
@$pb.TagNumber(40)
|
@$pb.TagNumber(40)
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
@$pb.TagNumber(42)
|
||||||
ApplicationData_ApplicationData whichApplicationData() =>
|
ApplicationData_ApplicationData whichApplicationData() =>
|
||||||
_ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!;
|
_ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!;
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|
@ -3658,6 +3777,8 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(38)
|
@$pb.TagNumber(38)
|
||||||
@$pb.TagNumber(39)
|
@$pb.TagNumber(39)
|
||||||
@$pb.TagNumber(40)
|
@$pb.TagNumber(40)
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
@$pb.TagNumber(42)
|
||||||
void clearApplicationData() => $_clearField($_whichOneof(0));
|
void clearApplicationData() => $_clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|
@ -4003,6 +4124,35 @@ class ApplicationData extends $pb.GeneratedMessage {
|
||||||
void clearUploadPqcPrekeys() => $_clearField(40);
|
void clearUploadPqcPrekeys() => $_clearField(40);
|
||||||
@$pb.TagNumber(40)
|
@$pb.TagNumber(40)
|
||||||
ApplicationData_UploadPqcPreKeys ensureUploadPqcPrekeys() => $_ensure(27);
|
ApplicationData_UploadPqcPreKeys ensureUploadPqcPrekeys() => $_ensure(27);
|
||||||
|
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
ApplicationData_GetPrivacyPassParameters get getPrivacyPassParameters =>
|
||||||
|
$_getN(28);
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
set getPrivacyPassParameters(
|
||||||
|
ApplicationData_GetPrivacyPassParameters value) =>
|
||||||
|
$_setField(41, value);
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
$core.bool hasGetPrivacyPassParameters() => $_has(28);
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
void clearGetPrivacyPassParameters() => $_clearField(41);
|
||||||
|
@$pb.TagNumber(41)
|
||||||
|
ApplicationData_GetPrivacyPassParameters ensureGetPrivacyPassParameters() =>
|
||||||
|
$_ensure(28);
|
||||||
|
|
||||||
|
@$pb.TagNumber(42)
|
||||||
|
ApplicationData_IssuePrivacyPassTokens get issuePrivacyPassTokens =>
|
||||||
|
$_getN(29);
|
||||||
|
@$pb.TagNumber(42)
|
||||||
|
set issuePrivacyPassTokens(ApplicationData_IssuePrivacyPassTokens value) =>
|
||||||
|
$_setField(42, value);
|
||||||
|
@$pb.TagNumber(42)
|
||||||
|
$core.bool hasIssuePrivacyPassTokens() => $_has(29);
|
||||||
|
@$pb.TagNumber(42)
|
||||||
|
void clearIssuePrivacyPassTokens() => $_clearField(42);
|
||||||
|
@$pb.TagNumber(42)
|
||||||
|
ApplicationData_IssuePrivacyPassTokens ensureIssuePrivacyPassTokens() =>
|
||||||
|
$_ensure(29);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Response_PreKey extends $pb.GeneratedMessage {
|
class Response_PreKey extends $pb.GeneratedMessage {
|
||||||
|
|
|
||||||
|
|
@ -733,6 +733,24 @@ const ApplicationData$json = {
|
||||||
'9': 0,
|
'9': 0,
|
||||||
'10': 'uploadPqcPrekeys'
|
'10': 'uploadPqcPrekeys'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'1': 'get_privacy_pass_parameters',
|
||||||
|
'3': 41,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.client_to_server.ApplicationData.GetPrivacyPassParameters',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'getPrivacyPassParameters'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'1': 'issue_privacy_pass_tokens',
|
||||||
|
'3': 42,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.client_to_server.ApplicationData.IssuePrivacyPassTokens',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'issuePrivacyPassTokens'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'3': [
|
'3': [
|
||||||
ApplicationData_TextMessage$json,
|
ApplicationData_TextMessage$json,
|
||||||
|
|
@ -763,7 +781,9 @@ const ApplicationData$json = {
|
||||||
ApplicationData_GetMemoriesUrl$json,
|
ApplicationData_GetMemoriesUrl$json,
|
||||||
ApplicationData_GetMemoriesUsage$json,
|
ApplicationData_GetMemoriesUsage$json,
|
||||||
ApplicationData_DeleteMemory$json,
|
ApplicationData_DeleteMemory$json,
|
||||||
ApplicationData_DisableMemoriesBackup$json
|
ApplicationData_DisableMemoriesBackup$json,
|
||||||
|
ApplicationData_GetPrivacyPassParameters$json,
|
||||||
|
ApplicationData_IssuePrivacyPassTokens$json
|
||||||
],
|
],
|
||||||
'8': [
|
'8': [
|
||||||
{'1': 'ApplicationData'},
|
{'1': 'ApplicationData'},
|
||||||
|
|
@ -1108,6 +1128,19 @@ const ApplicationData_DisableMemoriesBackup$json = {
|
||||||
'1': 'DisableMemoriesBackup',
|
'1': 'DisableMemoriesBackup',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@$core.Deprecated('Use applicationDataDescriptor instead')
|
||||||
|
const ApplicationData_GetPrivacyPassParameters$json = {
|
||||||
|
'1': 'GetPrivacyPassParameters',
|
||||||
|
};
|
||||||
|
|
||||||
|
@$core.Deprecated('Use applicationDataDescriptor instead')
|
||||||
|
const ApplicationData_IssuePrivacyPassTokens$json = {
|
||||||
|
'1': 'IssuePrivacyPassTokens',
|
||||||
|
'2': [
|
||||||
|
{'1': 'token_requests', '3': 1, '4': 3, '5': 12, '10': 'tokenRequests'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
/// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
|
final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
|
||||||
'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm'
|
'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm'
|
||||||
|
|
@ -1161,49 +1194,55 @@ final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
|
||||||
'c2VydmVyLkFwcGxpY2F0aW9uRGF0YS5EaXNhYmxlTWVtb3JpZXNCYWNrdXBIAFIVZGlzYWJsZU'
|
'c2VydmVyLkFwcGxpY2F0aW9uRGF0YS5EaXNhYmxlTWVtb3JpZXNCYWNrdXBIAFIVZGlzYWJsZU'
|
||||||
'1lbW9yaWVzQmFja3VwEmIKEnVwbG9hZF9wcWNfcHJla2V5cxgoIAEoCzIyLmNsaWVudF90b19z'
|
'1lbW9yaWVzQmFja3VwEmIKEnVwbG9hZF9wcWNfcHJla2V5cxgoIAEoCzIyLmNsaWVudF90b19z'
|
||||||
'ZXJ2ZXIuQXBwbGljYXRpb25EYXRhLlVwbG9hZFBxY1ByZUtleXNIAFIQdXBsb2FkUHFjUHJla2'
|
'ZXJ2ZXIuQXBwbGljYXRpb25EYXRhLlVwbG9hZFBxY1ByZUtleXNIAFIQdXBsb2FkUHFjUHJla2'
|
||||||
'V5cxpqCgtUZXh0TWVzc2FnZRIXCgd1c2VyX2lkGAEgASgDUgZ1c2VySWQSEgoEYm9keRgDIAEo'
|
'V5cxJ7ChtnZXRfcHJpdmFjeV9wYXNzX3BhcmFtZXRlcnMYKSABKAsyOi5jbGllbnRfdG9fc2Vy'
|
||||||
'DFIEYm9keRIgCglwdXNoX2RhdGEYBCABKAxIAFIIcHVzaERhdGGIAQFCDAoKX3B1c2hfZGF0YR'
|
'dmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRQcml2YWN5UGFzc1BhcmFtZXRlcnNIAFIYZ2V0UHJpdm'
|
||||||
'ovChFHZXRVc2VyQnlVc2VybmFtZRIaCgh1c2VybmFtZRgBIAEoCVIIdXNlcm5hbWUaLAoOQ2hh'
|
'FjeVBhc3NQYXJhbWV0ZXJzEnUKGWlzc3VlX3ByaXZhY3lfcGFzc190b2tlbnMYKiABKAsyOC5j'
|
||||||
'bmdlVXNlcm5hbWUSGgoIdXNlcm5hbWUYASABKAlSCHVzZXJuYW1lGjUKFFVwZGF0ZUdvb2dsZU'
|
'bGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5Jc3N1ZVByaXZhY3lQYXNzVG9rZW5zSA'
|
||||||
'ZjbVRva2VuEh0KCmdvb2dsZV9mY20YASABKAlSCWdvb2dsZUZjbRomCgtHZXRVc2VyQnlJZBIX'
|
'BSFmlzc3VlUHJpdmFjeVBhc3NUb2tlbnMaagoLVGV4dE1lc3NhZ2USFwoHdXNlcl9pZBgBIAEo'
|
||||||
'Cgd1c2VyX2lkGAEgASgDUgZ1c2VySWQaEwoRR2V0QXZhaWxhYmxlUGxhbnMaFQoTR2V0Q3Vycm'
|
'A1IGdXNlcklkEhIKBGJvZHkYAyABKAxSBGJvZHkSIAoJcHVzaF9kYXRhGAQgASgMSABSCHB1c2'
|
||||||
'VudFBsYW5JbmZvcxovChRSZW1vdmVBZGRpdGlvbmFsVXNlchIXCgd1c2VyX2lkGAEgASgDUgZ1'
|
'hEYXRhiAEBQgwKCl9wdXNoX2RhdGEaLwoRR2V0VXNlckJ5VXNlcm5hbWUSGgoIdXNlcm5hbWUY'
|
||||||
'c2VySWQaLQoSR2V0UHJla2V5c0J5VXNlcklkEhcKB3VzZXJfaWQYASABKANSBnVzZXJJZBoyCh'
|
'ASABKAlSCHVzZXJuYW1lGiwKDkNoYW5nZVVzZXJuYW1lEhoKCHVzZXJuYW1lGAEgASgJUgh1c2'
|
||||||
'dHZXRTaWduZWRQcmVLZXlCeVVzZXJJZBIXCgd1c2VyX2lkGAEgASgDUgZ1c2VySWQamwEKElVw'
|
'VybmFtZRo1ChRVcGRhdGVHb29nbGVGY21Ub2tlbhIdCgpnb29nbGVfZmNtGAEgASgJUglnb29n'
|
||||||
'ZGF0ZVNpZ25lZFByZUtleRIoChBzaWduZWRfcHJla2V5X2lkGAEgASgDUg5zaWduZWRQcmVrZX'
|
'bGVGY20aJgoLR2V0VXNlckJ5SWQSFwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGhMKEUdldEF2YW'
|
||||||
'lJZBIjCg1zaWduZWRfcHJla2V5GAIgASgMUgxzaWduZWRQcmVrZXkSNgoXc2lnbmVkX3ByZWtl'
|
'lsYWJsZVBsYW5zGhUKE0dldEN1cnJlbnRQbGFuSW5mb3MaLwoUUmVtb3ZlQWRkaXRpb25hbFVz'
|
||||||
'eV9zaWduYXR1cmUYAyABKAxSFXNpZ25lZFByZWtleVNpZ25hdHVyZRrUAQoJUHFjUHJlS2V5Ei'
|
'ZXISFwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGi0KEkdldFByZWtleXNCeVVzZXJJZBIXCgd1c2'
|
||||||
'MKDmVjY19wcmVfa2V5X2lkGAEgASgDUgtlY2NQcmVLZXlJZBIeCgtlY2NfcHJlX2tleRgCIAEo'
|
'VyX2lkGAEgASgDUgZ1c2VySWQaMgoXR2V0U2lnbmVkUHJlS2V5QnlVc2VySWQSFwoHdXNlcl9p'
|
||||||
'DFIJZWNjUHJlS2V5EicKEGt5YmVyX3ByZV9rZXlfaWQYAyABKANSDWt5YmVyUHJlS2V5SWQSIg'
|
'ZBgBIAEoA1IGdXNlcklkGpsBChJVcGRhdGVTaWduZWRQcmVLZXkSKAoQc2lnbmVkX3ByZWtleV'
|
||||||
'oNa3liZXJfcHJlX2tleRgEIAEoDFILa3liZXJQcmVLZXkSNQoXa3liZXJfcHJlX2tleV9zaWdu'
|
'9pZBgBIAEoA1IOc2lnbmVkUHJla2V5SWQSIwoNc2lnbmVkX3ByZWtleRgCIAEoDFIMc2lnbmVk'
|
||||||
'YXR1cmUYBSABKAxSFGt5YmVyUHJlS2V5U2lnbmF0dXJlGp0DChBVcGxvYWRQcWNQcmVLZXlzEi'
|
'UHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMgASgMUhVzaWduZWRQcmVrZXlTaW'
|
||||||
'8KFGVjY19zaWduZWRfcHJla2V5X2lkGAEgASgDUhFlY2NTaWduZWRQcmVrZXlJZBIqChFlY2Nf'
|
'duYXR1cmUa1AEKCVBxY1ByZUtleRIjCg5lY2NfcHJlX2tleV9pZBgBIAEoA1ILZWNjUHJlS2V5'
|
||||||
'c2lnbmVkX3ByZWtleRgCIAEoDFIPZWNjU2lnbmVkUHJla2V5Ej0KG2VjY19zaWduZWRfcHJla2'
|
'SWQSHgoLZWNjX3ByZV9rZXkYAiABKAxSCWVjY1ByZUtleRInChBreWJlcl9wcmVfa2V5X2lkGA'
|
||||||
'V5X3NpZ25hdHVyZRgDIAEoDFIYZWNjU2lnbmVkUHJla2V5U2lnbmF0dXJlEjMKFmt5YmVyX3Np'
|
'MgASgDUg1reWJlclByZUtleUlkEiIKDWt5YmVyX3ByZV9rZXkYBCABKAxSC2t5YmVyUHJlS2V5'
|
||||||
'Z25lZF9wcmVrZXlfaWQYBCABKANSE2t5YmVyU2lnbmVkUHJla2V5SWQSLgoTa3liZXJfc2lnbm'
|
'EjUKF2t5YmVyX3ByZV9rZXlfc2lnbmF0dXJlGAUgASgMUhRreWJlclByZUtleVNpZ25hdHVyZR'
|
||||||
'VkX3ByZWtleRgFIAEoDFIRa3liZXJTaWduZWRQcmVrZXkSQQoda3liZXJfc2lnbmVkX3ByZWtl'
|
'qdAwoQVXBsb2FkUHFjUHJlS2V5cxIvChRlY2Nfc2lnbmVkX3ByZWtleV9pZBgBIAEoA1IRZWNj'
|
||||||
'eV9zaWduYXR1cmUYBiABKAxSGmt5YmVyU2lnbmVkUHJla2V5U2lnbmF0dXJlEkUKB3ByZWtleX'
|
'U2lnbmVkUHJla2V5SWQSKgoRZWNjX3NpZ25lZF9wcmVrZXkYAiABKAxSD2VjY1NpZ25lZFByZW'
|
||||||
'MYByADKAsyKy5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5QcWNQcmVLZXlSB3By'
|
'tleRI9ChtlY2Nfc2lnbmVkX3ByZWtleV9zaWduYXR1cmUYAyABKAxSGGVjY1NpZ25lZFByZWtl'
|
||||||
'ZWtleXMaNQoMRG93bmxvYWREb25lEiUKDmRvd25sb2FkX3Rva2VuGAEgASgMUg1kb3dubG9hZF'
|
'eVNpZ25hdHVyZRIzChZreWJlcl9zaWduZWRfcHJla2V5X2lkGAQgASgDUhNreWJlclNpZ25lZF'
|
||||||
'Rva2VuGk4KClJlcG9ydFVzZXISKAoQcmVwb3J0ZWRfdXNlcl9pZBgBIAEoA1IOcmVwb3J0ZWRV'
|
'ByZWtleUlkEi4KE2t5YmVyX3NpZ25lZF9wcmVrZXkYBSABKAxSEWt5YmVyU2lnbmVkUHJla2V5'
|
||||||
'c2VySWQSFgoGcmVhc29uGAIgASgJUgZyZWFzb24acQoLSVBBUHVyY2hhc2USHQoKcHJvZHVjdF'
|
'EkEKHWt5YmVyX3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAYgASgMUhpreWJlclNpZ25lZFByZW'
|
||||||
'9pZBgBIAEoCVIJcHJvZHVjdElkEhYKBnNvdXJjZRgCIAEoCVIGc291cmNlEisKEXZlcmlmaWNh'
|
'tleVNpZ25hdHVyZRJFCgdwcmVrZXlzGAcgAygLMisuY2xpZW50X3RvX3NlcnZlci5BcHBsaWNh'
|
||||||
'dGlvbl9kYXRhGAMgASgJUhB2ZXJpZmljYXRpb25EYXRhGg8KDUlQQUZvcmNlQ2hlY2saDwoNRG'
|
'dGlvbkRhdGEuUHFjUHJlS2V5UgdwcmVrZXlzGjUKDERvd25sb2FkRG9uZRIlCg5kb3dubG9hZF'
|
||||||
'VsZXRlQWNjb3VudBosChFBZGRBZGRpdGlvbmFsVXNlchIXCgd1c2VyX2lkGAEgASgDUgZ1c2Vy'
|
'90b2tlbhgBIAEoDFINZG93bmxvYWRUb2tlbhpOCgpSZXBvcnRVc2VyEigKEHJlcG9ydGVkX3Vz'
|
||||||
'SWQaMAoNU2V0TG9naW5Ub2tlbhIfCgtsb2dpbl90b2tlbhgBIAEoDFIKbG9naW5Ub2tlbhqOAQ'
|
'ZXJfaWQYASABKANSDnJlcG9ydGVkVXNlcklkEhYKBnJlYXNvbhgCIAEoCVIGcmVhc29uGnEKC0'
|
||||||
'ocUmVnaXN0ZXJQYXNzd29yZExlc3NSZWNvdmVyeRIuChJlbmNyeXB0ZWRTZXJ2ZXJLZXkYASAB'
|
'lQQVB1cmNoYXNlEh0KCnByb2R1Y3RfaWQYASABKAlSCXByb2R1Y3RJZBIWCgZzb3VyY2UYAiAB'
|
||||||
'KAxSEmVuY3J5cHRlZFNlcnZlcktleRIrCg5waW5VbmxvY2tUb2tlbhgCIAEoDEgAUg5waW5Vbm'
|
'KAlSBnNvdXJjZRIrChF2ZXJpZmljYXRpb25fZGF0YRgDIAEoCVIQdmVyaWZpY2F0aW9uRGF0YR'
|
||||||
'xvY2tUb2tlbogBAUIRCg9fcGluVW5sb2NrVG9rZW4acAoYUGFzc3dvcmRsZXNzTm90aWZpY2F0'
|
'oPCg1JUEFGb3JjZUNoZWNrGg8KDURlbGV0ZUFjY291bnQaLAoRQWRkQWRkaXRpb25hbFVzZXIS'
|
||||||
'aW9uEicKD25vdGlmaWNhdGlvbl9pZBgBIAEoCVIObm90aWZpY2F0aW9uSWQSKwoRZW5jcnlwdG'
|
'FwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGjAKDVNldExvZ2luVG9rZW4SHwoLbG9naW5fdG9rZW'
|
||||||
'VkX21lc3NhZ2UYAiABKAxSEGVuY3J5cHRlZE1lc3NhZ2UaawoVUmVxdWVzdE1lbW9yaWVzVXBs'
|
'4YASABKAxSCmxvZ2luVG9rZW4ajgEKHFJlZ2lzdGVyUGFzc3dvcmRMZXNzUmVjb3ZlcnkSLgoS'
|
||||||
'b2FkEhIKBHNpemUYASABKANSBHNpemUSIwoNb3JpZ2luYWxfZGF0ZRgCIAEoA1IMb3JpZ2luYW'
|
'ZW5jcnlwdGVkU2VydmVyS2V5GAEgASgMUhJlbmNyeXB0ZWRTZXJ2ZXJLZXkSKwoOcGluVW5sb2'
|
||||||
'xEYXRlEhkKCG1lZGlhX2lkGAMgASgJUgdtZWRpYUlkGjIKFUNvbmZpcm1NZW1vcmllc1VwbG9h'
|
'NrVG9rZW4YAiABKAxIAFIOcGluVW5sb2NrVG9rZW6IAQFCEQoPX3BpblVubG9ja1Rva2VuGnAK'
|
||||||
'ZBIZCghtZWRpYV9pZBgBIAEoCVIHbWVkaWFJZBpICg9HZXRNZW1vcmllc0xpc3QSHwoLb2Zmc2'
|
'GFBhc3N3b3JkbGVzc05vdGlmaWNhdGlvbhInCg9ub3RpZmljYXRpb25faWQYASABKAlSDm5vdG'
|
||||||
'V0X2RhdGUYASABKANSCm9mZnNldERhdGUSFAoFbGltaXQYAiABKANSBWxpbWl0GkkKDkdldE1l'
|
'lmaWNhdGlvbklkEisKEWVuY3J5cHRlZF9tZXNzYWdlGAIgASgMUhBlbmNyeXB0ZWRNZXNzYWdl'
|
||||||
'bW9yaWVzVXJsEhkKCG1lZGlhX2lkGAEgASgJUgdtZWRpYUlkEhwKCXRodW1ibmFpbBgCIAEoCF'
|
'GmsKFVJlcXVlc3RNZW1vcmllc1VwbG9hZBISCgRzaXplGAEgASgDUgRzaXplEiMKDW9yaWdpbm'
|
||||||
'IJdGh1bWJuYWlsGhIKEEdldE1lbW9yaWVzVXNhZ2UaKQoMRGVsZXRlTWVtb3J5EhkKCG1lZGlh'
|
'FsX2RhdGUYAiABKANSDG9yaWdpbmFsRGF0ZRIZCghtZWRpYV9pZBgDIAEoCVIHbWVkaWFJZBoy'
|
||||||
'X2lkGAEgASgJUgdtZWRpYUlkGhcKFURpc2FibGVNZW1vcmllc0JhY2t1cEIRCg9BcHBsaWNhdG'
|
'ChVDb25maXJtTWVtb3JpZXNVcGxvYWQSGQoIbWVkaWFfaWQYASABKAlSB21lZGlhSWQaSAoPR2'
|
||||||
'lvbkRhdGFKBAgJEApKBAgLEAxKBAgNEBJKBAgTEBQ=');
|
'V0TWVtb3JpZXNMaXN0Eh8KC29mZnNldF9kYXRlGAEgASgDUgpvZmZzZXREYXRlEhQKBWxpbWl0'
|
||||||
|
'GAIgASgDUgVsaW1pdBpJCg5HZXRNZW1vcmllc1VybBIZCghtZWRpYV9pZBgBIAEoCVIHbWVkaW'
|
||||||
|
'FJZBIcCgl0aHVtYm5haWwYAiABKAhSCXRodW1ibmFpbBoSChBHZXRNZW1vcmllc1VzYWdlGikK'
|
||||||
|
'DERlbGV0ZU1lbW9yeRIZCghtZWRpYV9pZBgBIAEoCVIHbWVkaWFJZBoXChVEaXNhYmxlTWVtb3'
|
||||||
|
'JpZXNCYWNrdXAaGgoYR2V0UHJpdmFjeVBhc3NQYXJhbWV0ZXJzGj8KFklzc3VlUHJpdmFjeVBh'
|
||||||
|
'c3NUb2tlbnMSJQoOdG9rZW5fcmVxdWVzdHMYASADKAxSDXRva2VuUmVxdWVzdHNCEQoPQXBwbG'
|
||||||
|
'ljYXRpb25EYXRhSgQICRAKSgQICxAMSgQIDRASSgQIExAU');
|
||||||
|
|
||||||
@$core.Deprecated('Use responseDescriptor instead')
|
@$core.Deprecated('Use responseDescriptor instead')
|
||||||
const Response$json = {
|
const Response$json = {
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,8 @@ enum V0_Kind {
|
||||||
error,
|
error,
|
||||||
newMessages,
|
newMessages,
|
||||||
requestNewPqcPreKeys,
|
requestNewPqcPreKeys,
|
||||||
|
sealedSenderMessage,
|
||||||
|
sealedSenderMessages,
|
||||||
notSet
|
notSet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,6 +110,8 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
$0.ErrorCode? error,
|
$0.ErrorCode? error,
|
||||||
NewMessages? newMessages,
|
NewMessages? newMessages,
|
||||||
$core.bool? requestNewPqcPreKeys,
|
$core.bool? requestNewPqcPreKeys,
|
||||||
|
SealedSenderMessage? sealedSenderMessage,
|
||||||
|
SealedSenderMessages? sealedSenderMessages,
|
||||||
}) {
|
}) {
|
||||||
final result = create();
|
final result = create();
|
||||||
if (seq != null) result.seq = seq;
|
if (seq != null) result.seq = seq;
|
||||||
|
|
@ -118,6 +122,10 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
if (newMessages != null) result.newMessages = newMessages;
|
if (newMessages != null) result.newMessages = newMessages;
|
||||||
if (requestNewPqcPreKeys != null)
|
if (requestNewPqcPreKeys != null)
|
||||||
result.requestNewPqcPreKeys = requestNewPqcPreKeys;
|
result.requestNewPqcPreKeys = requestNewPqcPreKeys;
|
||||||
|
if (sealedSenderMessage != null)
|
||||||
|
result.sealedSenderMessage = sealedSenderMessage;
|
||||||
|
if (sealedSenderMessages != null)
|
||||||
|
result.sealedSenderMessages = sealedSenderMessages;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,6 +145,8 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
6: V0_Kind.error,
|
6: V0_Kind.error,
|
||||||
7: V0_Kind.newMessages,
|
7: V0_Kind.newMessages,
|
||||||
8: V0_Kind.requestNewPqcPreKeys,
|
8: V0_Kind.requestNewPqcPreKeys,
|
||||||
|
9: V0_Kind.sealedSenderMessage,
|
||||||
|
10: V0_Kind.sealedSenderMessages,
|
||||||
0: V0_Kind.notSet
|
0: V0_Kind.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
|
@ -144,7 +154,7 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
package:
|
package:
|
||||||
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..oo(0, [2, 3, 4, 6, 7, 8])
|
..oo(0, [2, 3, 4, 6, 7, 8, 9, 10])
|
||||||
..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6,
|
..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6,
|
||||||
defaultOrMaker: $fixnum.Int64.ZERO)
|
defaultOrMaker: $fixnum.Int64.ZERO)
|
||||||
..aOM<Response>(2, _omitFieldNames ? '' : 'response',
|
..aOM<Response>(2, _omitFieldNames ? '' : 'response',
|
||||||
|
|
@ -159,6 +169,13 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
protoName: 'newMessages', subBuilder: NewMessages.create)
|
protoName: 'newMessages', subBuilder: NewMessages.create)
|
||||||
..aOB(8, _omitFieldNames ? '' : 'RequestNewPqcPreKeys',
|
..aOB(8, _omitFieldNames ? '' : 'RequestNewPqcPreKeys',
|
||||||
protoName: 'RequestNewPqcPreKeys')
|
protoName: 'RequestNewPqcPreKeys')
|
||||||
|
..aOM<SealedSenderMessage>(9, _omitFieldNames ? '' : 'sealedSenderMessage',
|
||||||
|
protoName: 'sealedSenderMessage',
|
||||||
|
subBuilder: SealedSenderMessage.create)
|
||||||
|
..aOM<SealedSenderMessages>(
|
||||||
|
10, _omitFieldNames ? '' : 'sealedSenderMessages',
|
||||||
|
protoName: 'sealedSenderMessages',
|
||||||
|
subBuilder: SealedSenderMessages.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
|
@ -185,6 +202,8 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(6)
|
@$pb.TagNumber(6)
|
||||||
@$pb.TagNumber(7)
|
@$pb.TagNumber(7)
|
||||||
@$pb.TagNumber(8)
|
@$pb.TagNumber(8)
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
@$pb.TagNumber(10)
|
||||||
V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!;
|
V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!;
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
|
|
@ -192,6 +211,8 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(6)
|
@$pb.TagNumber(6)
|
||||||
@$pb.TagNumber(7)
|
@$pb.TagNumber(7)
|
||||||
@$pb.TagNumber(8)
|
@$pb.TagNumber(8)
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
@$pb.TagNumber(10)
|
||||||
void clearKind() => $_clearField($_whichOneof(0));
|
void clearKind() => $_clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|
@ -262,6 +283,28 @@ class V0 extends $pb.GeneratedMessage {
|
||||||
$core.bool hasRequestNewPqcPreKeys() => $_has(6);
|
$core.bool hasRequestNewPqcPreKeys() => $_has(6);
|
||||||
@$pb.TagNumber(8)
|
@$pb.TagNumber(8)
|
||||||
void clearRequestNewPqcPreKeys() => $_clearField(8);
|
void clearRequestNewPqcPreKeys() => $_clearField(8);
|
||||||
|
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
SealedSenderMessage get sealedSenderMessage => $_getN(7);
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
set sealedSenderMessage(SealedSenderMessage value) => $_setField(9, value);
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
$core.bool hasSealedSenderMessage() => $_has(7);
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
void clearSealedSenderMessage() => $_clearField(9);
|
||||||
|
@$pb.TagNumber(9)
|
||||||
|
SealedSenderMessage ensureSealedSenderMessage() => $_ensure(7);
|
||||||
|
|
||||||
|
@$pb.TagNumber(10)
|
||||||
|
SealedSenderMessages get sealedSenderMessages => $_getN(8);
|
||||||
|
@$pb.TagNumber(10)
|
||||||
|
set sealedSenderMessages(SealedSenderMessages value) => $_setField(10, value);
|
||||||
|
@$pb.TagNumber(10)
|
||||||
|
$core.bool hasSealedSenderMessages() => $_has(8);
|
||||||
|
@$pb.TagNumber(10)
|
||||||
|
void clearSealedSenderMessages() => $_clearField(10);
|
||||||
|
@$pb.TagNumber(10)
|
||||||
|
SealedSenderMessages ensureSealedSenderMessages() => $_ensure(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
class NewMessage extends $pb.GeneratedMessage {
|
class NewMessage extends $pb.GeneratedMessage {
|
||||||
|
|
@ -381,6 +424,124 @@ class NewMessages extends $pb.GeneratedMessage {
|
||||||
$pb.PbList<NewMessage> get newMessages => $_getList(0);
|
$pb.PbList<NewMessage> get newMessages => $_getList(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SealedSenderMessage extends $pb.GeneratedMessage {
|
||||||
|
factory SealedSenderMessage({
|
||||||
|
$core.String? messageId,
|
||||||
|
$core.List<$core.int>? body,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (messageId != null) result.messageId = messageId;
|
||||||
|
if (body != null) result.body = body;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
SealedSenderMessage._();
|
||||||
|
|
||||||
|
factory SealedSenderMessage.fromBuffer($core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory SealedSenderMessage.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'SealedSenderMessage',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..aOS(1, _omitFieldNames ? '' : 'messageId')
|
||||||
|
..a<$core.List<$core.int>>(
|
||||||
|
2, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessage clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessage copyWith(void Function(SealedSenderMessage) updates) =>
|
||||||
|
super.copyWith((message) => updates(message as SealedSenderMessage))
|
||||||
|
as SealedSenderMessage;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessage create() => SealedSenderMessage._();
|
||||||
|
@$core.override
|
||||||
|
SealedSenderMessage createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessage getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<SealedSenderMessage>(create);
|
||||||
|
static SealedSenderMessage? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.String get messageId => $_getSZ(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
set messageId($core.String value) => $_setString(0, value);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.bool hasMessageId() => $_has(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
void clearMessageId() => $_clearField(1);
|
||||||
|
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.List<$core.int> get body => $_getN(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
set body($core.List<$core.int> value) => $_setBytes(1, value);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.bool hasBody() => $_has(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
void clearBody() => $_clearField(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SealedSenderMessages extends $pb.GeneratedMessage {
|
||||||
|
factory SealedSenderMessages({
|
||||||
|
$core.Iterable<SealedSenderMessage>? messages,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (messages != null) result.messages.addAll(messages);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
SealedSenderMessages._();
|
||||||
|
|
||||||
|
factory SealedSenderMessages.fromBuffer($core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory SealedSenderMessages.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'SealedSenderMessages',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..pPM<SealedSenderMessage>(1, _omitFieldNames ? '' : 'messages',
|
||||||
|
subBuilder: SealedSenderMessage.create)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessages clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
SealedSenderMessages copyWith(void Function(SealedSenderMessages) updates) =>
|
||||||
|
super.copyWith((message) => updates(message as SealedSenderMessages))
|
||||||
|
as SealedSenderMessages;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessages create() => SealedSenderMessages._();
|
||||||
|
@$core.override
|
||||||
|
SealedSenderMessages createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static SealedSenderMessages getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<SealedSenderMessages>(create);
|
||||||
|
static SealedSenderMessages? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$pb.PbList<SealedSenderMessage> get messages => $_getList(0);
|
||||||
|
}
|
||||||
|
|
||||||
class Response_Authenticated extends $pb.GeneratedMessage {
|
class Response_Authenticated extends $pb.GeneratedMessage {
|
||||||
factory Response_Authenticated({
|
factory Response_Authenticated({
|
||||||
$core.String? plan,
|
$core.String? plan,
|
||||||
|
|
@ -2307,6 +2468,186 @@ class Response_MemoriesUsage extends $pb.GeneratedMessage {
|
||||||
void clearCount() => $_clearField(3);
|
void clearCount() => $_clearField(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Response_PrivacyPassParameters extends $pb.GeneratedMessage {
|
||||||
|
factory Response_PrivacyPassParameters({
|
||||||
|
$core.List<$core.int>? tokenChallenge,
|
||||||
|
$core.List<$core.int>? publicKey,
|
||||||
|
$core.int? maxBatchSize,
|
||||||
|
$core.int? maxAgeSeconds,
|
||||||
|
$core.int? dailyTokenLimit,
|
||||||
|
$core.int? issuanceCooldownSeconds,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (tokenChallenge != null) result.tokenChallenge = tokenChallenge;
|
||||||
|
if (publicKey != null) result.publicKey = publicKey;
|
||||||
|
if (maxBatchSize != null) result.maxBatchSize = maxBatchSize;
|
||||||
|
if (maxAgeSeconds != null) result.maxAgeSeconds = maxAgeSeconds;
|
||||||
|
if (dailyTokenLimit != null) result.dailyTokenLimit = dailyTokenLimit;
|
||||||
|
if (issuanceCooldownSeconds != null)
|
||||||
|
result.issuanceCooldownSeconds = issuanceCooldownSeconds;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Response_PrivacyPassParameters._();
|
||||||
|
|
||||||
|
factory Response_PrivacyPassParameters.fromBuffer($core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory Response_PrivacyPassParameters.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'Response.PrivacyPassParameters',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..a<$core.List<$core.int>>(
|
||||||
|
1, _omitFieldNames ? '' : 'tokenChallenge', $pb.PbFieldType.OY)
|
||||||
|
..a<$core.List<$core.int>>(
|
||||||
|
2, _omitFieldNames ? '' : 'publicKey', $pb.PbFieldType.OY)
|
||||||
|
..aI(3, _omitFieldNames ? '' : 'maxBatchSize',
|
||||||
|
fieldType: $pb.PbFieldType.OU3)
|
||||||
|
..aI(4, _omitFieldNames ? '' : 'maxAgeSeconds',
|
||||||
|
fieldType: $pb.PbFieldType.OU3)
|
||||||
|
..aI(5, _omitFieldNames ? '' : 'dailyTokenLimit',
|
||||||
|
fieldType: $pb.PbFieldType.OU3)
|
||||||
|
..aI(6, _omitFieldNames ? '' : 'issuanceCooldownSeconds',
|
||||||
|
fieldType: $pb.PbFieldType.OU3)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
Response_PrivacyPassParameters clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
Response_PrivacyPassParameters copyWith(
|
||||||
|
void Function(Response_PrivacyPassParameters) updates) =>
|
||||||
|
super.copyWith(
|
||||||
|
(message) => updates(message as Response_PrivacyPassParameters))
|
||||||
|
as Response_PrivacyPassParameters;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static Response_PrivacyPassParameters create() =>
|
||||||
|
Response_PrivacyPassParameters._();
|
||||||
|
@$core.override
|
||||||
|
Response_PrivacyPassParameters createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static Response_PrivacyPassParameters getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<Response_PrivacyPassParameters>(create);
|
||||||
|
static Response_PrivacyPassParameters? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.List<$core.int> get tokenChallenge => $_getN(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
set tokenChallenge($core.List<$core.int> value) => $_setBytes(0, value);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$core.bool hasTokenChallenge() => $_has(0);
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
void clearTokenChallenge() => $_clearField(1);
|
||||||
|
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.List<$core.int> get publicKey => $_getN(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
set publicKey($core.List<$core.int> value) => $_setBytes(1, value);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
$core.bool hasPublicKey() => $_has(1);
|
||||||
|
@$pb.TagNumber(2)
|
||||||
|
void clearPublicKey() => $_clearField(2);
|
||||||
|
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.int get maxBatchSize => $_getIZ(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
set maxBatchSize($core.int value) => $_setUnsignedInt32(2, value);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
$core.bool hasMaxBatchSize() => $_has(2);
|
||||||
|
@$pb.TagNumber(3)
|
||||||
|
void clearMaxBatchSize() => $_clearField(3);
|
||||||
|
|
||||||
|
@$pb.TagNumber(4)
|
||||||
|
$core.int get maxAgeSeconds => $_getIZ(3);
|
||||||
|
@$pb.TagNumber(4)
|
||||||
|
set maxAgeSeconds($core.int value) => $_setUnsignedInt32(3, value);
|
||||||
|
@$pb.TagNumber(4)
|
||||||
|
$core.bool hasMaxAgeSeconds() => $_has(3);
|
||||||
|
@$pb.TagNumber(4)
|
||||||
|
void clearMaxAgeSeconds() => $_clearField(4);
|
||||||
|
|
||||||
|
@$pb.TagNumber(5)
|
||||||
|
$core.int get dailyTokenLimit => $_getIZ(4);
|
||||||
|
@$pb.TagNumber(5)
|
||||||
|
set dailyTokenLimit($core.int value) => $_setUnsignedInt32(4, value);
|
||||||
|
@$pb.TagNumber(5)
|
||||||
|
$core.bool hasDailyTokenLimit() => $_has(4);
|
||||||
|
@$pb.TagNumber(5)
|
||||||
|
void clearDailyTokenLimit() => $_clearField(5);
|
||||||
|
|
||||||
|
@$pb.TagNumber(6)
|
||||||
|
$core.int get issuanceCooldownSeconds => $_getIZ(5);
|
||||||
|
@$pb.TagNumber(6)
|
||||||
|
set issuanceCooldownSeconds($core.int value) => $_setUnsignedInt32(5, value);
|
||||||
|
@$pb.TagNumber(6)
|
||||||
|
$core.bool hasIssuanceCooldownSeconds() => $_has(5);
|
||||||
|
@$pb.TagNumber(6)
|
||||||
|
void clearIssuanceCooldownSeconds() => $_clearField(6);
|
||||||
|
}
|
||||||
|
|
||||||
|
class Response_PrivacyPassTokenResponses extends $pb.GeneratedMessage {
|
||||||
|
factory Response_PrivacyPassTokenResponses({
|
||||||
|
$core.Iterable<$core.List<$core.int>>? tokenResponses,
|
||||||
|
}) {
|
||||||
|
final result = create();
|
||||||
|
if (tokenResponses != null) result.tokenResponses.addAll(tokenResponses);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Response_PrivacyPassTokenResponses._();
|
||||||
|
|
||||||
|
factory Response_PrivacyPassTokenResponses.fromBuffer(
|
||||||
|
$core.List<$core.int> data,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromBuffer(data, registry);
|
||||||
|
factory Response_PrivacyPassTokenResponses.fromJson($core.String json,
|
||||||
|
[$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>
|
||||||
|
create()..mergeFromJson(json, registry);
|
||||||
|
|
||||||
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
_omitMessageNames ? '' : 'Response.PrivacyPassTokenResponses',
|
||||||
|
package:
|
||||||
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
|
createEmptyInstance: create)
|
||||||
|
..p<$core.List<$core.int>>(
|
||||||
|
1, _omitFieldNames ? '' : 'tokenResponses', $pb.PbFieldType.PY)
|
||||||
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
Response_PrivacyPassTokenResponses clone() => deepCopy();
|
||||||
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
Response_PrivacyPassTokenResponses copyWith(
|
||||||
|
void Function(Response_PrivacyPassTokenResponses) updates) =>
|
||||||
|
super.copyWith((message) =>
|
||||||
|
updates(message as Response_PrivacyPassTokenResponses))
|
||||||
|
as Response_PrivacyPassTokenResponses;
|
||||||
|
|
||||||
|
@$core.override
|
||||||
|
$pb.BuilderInfo get info_ => _i;
|
||||||
|
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static Response_PrivacyPassTokenResponses create() =>
|
||||||
|
Response_PrivacyPassTokenResponses._();
|
||||||
|
@$core.override
|
||||||
|
Response_PrivacyPassTokenResponses createEmptyInstance() => create();
|
||||||
|
@$core.pragma('dart2js:noInline')
|
||||||
|
static Response_PrivacyPassTokenResponses getDefault() => _defaultInstance ??=
|
||||||
|
$pb.GeneratedMessage.$_defaultFor<Response_PrivacyPassTokenResponses>(
|
||||||
|
create);
|
||||||
|
static Response_PrivacyPassTokenResponses? _defaultInstance;
|
||||||
|
|
||||||
|
@$pb.TagNumber(1)
|
||||||
|
$pb.PbList<$core.List<$core.int>> get tokenResponses => $_getList(0);
|
||||||
|
}
|
||||||
|
|
||||||
enum Response_Ok_Ok {
|
enum Response_Ok_Ok {
|
||||||
none,
|
none,
|
||||||
userid,
|
userid,
|
||||||
|
|
@ -2327,6 +2668,8 @@ enum Response_Ok_Ok {
|
||||||
memoriesList,
|
memoriesList,
|
||||||
memoriesUrl,
|
memoriesUrl,
|
||||||
memoriesUsage,
|
memoriesUsage,
|
||||||
|
privacyPassParameters,
|
||||||
|
privacyPassTokenResponses,
|
||||||
notSet
|
notSet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2351,6 +2694,8 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
Response_MemoriesList? memoriesList,
|
Response_MemoriesList? memoriesList,
|
||||||
Response_MemoriesUrl? memoriesUrl,
|
Response_MemoriesUrl? memoriesUrl,
|
||||||
Response_MemoriesUsage? memoriesUsage,
|
Response_MemoriesUsage? memoriesUsage,
|
||||||
|
Response_PrivacyPassParameters? privacyPassParameters,
|
||||||
|
Response_PrivacyPassTokenResponses? privacyPassTokenResponses,
|
||||||
}) {
|
}) {
|
||||||
final result = create();
|
final result = create();
|
||||||
if (none != null) result.none = none;
|
if (none != null) result.none = none;
|
||||||
|
|
@ -2377,6 +2722,10 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
if (memoriesList != null) result.memoriesList = memoriesList;
|
if (memoriesList != null) result.memoriesList = memoriesList;
|
||||||
if (memoriesUrl != null) result.memoriesUrl = memoriesUrl;
|
if (memoriesUrl != null) result.memoriesUrl = memoriesUrl;
|
||||||
if (memoriesUsage != null) result.memoriesUsage = memoriesUsage;
|
if (memoriesUsage != null) result.memoriesUsage = memoriesUsage;
|
||||||
|
if (privacyPassParameters != null)
|
||||||
|
result.privacyPassParameters = privacyPassParameters;
|
||||||
|
if (privacyPassTokenResponses != null)
|
||||||
|
result.privacyPassTokenResponses = privacyPassTokenResponses;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2409,6 +2758,8 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
19: Response_Ok_Ok.memoriesList,
|
19: Response_Ok_Ok.memoriesList,
|
||||||
20: Response_Ok_Ok.memoriesUrl,
|
20: Response_Ok_Ok.memoriesUrl,
|
||||||
21: Response_Ok_Ok.memoriesUsage,
|
21: Response_Ok_Ok.memoriesUsage,
|
||||||
|
22: Response_Ok_Ok.privacyPassParameters,
|
||||||
|
23: Response_Ok_Ok.privacyPassTokenResponses,
|
||||||
0: Response_Ok_Ok.notSet
|
0: Response_Ok_Ok.notSet
|
||||||
};
|
};
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
|
||||||
|
|
@ -2416,8 +2767,29 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
package:
|
package:
|
||||||
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'),
|
||||||
createEmptyInstance: create)
|
createEmptyInstance: create)
|
||||||
..oo(
|
..oo(0, [
|
||||||
0, [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
6,
|
||||||
|
8,
|
||||||
|
9,
|
||||||
|
10,
|
||||||
|
12,
|
||||||
|
13,
|
||||||
|
14,
|
||||||
|
15,
|
||||||
|
16,
|
||||||
|
17,
|
||||||
|
18,
|
||||||
|
19,
|
||||||
|
20,
|
||||||
|
21,
|
||||||
|
22,
|
||||||
|
23
|
||||||
|
])
|
||||||
..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None')
|
..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None')
|
||||||
..aInt64(2, _omitFieldNames ? '' : 'userid')
|
..aInt64(2, _omitFieldNames ? '' : 'userid')
|
||||||
..a<$core.List<$core.int>>(
|
..a<$core.List<$core.int>>(
|
||||||
|
|
@ -2459,6 +2831,12 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
subBuilder: Response_MemoriesUrl.create)
|
subBuilder: Response_MemoriesUrl.create)
|
||||||
..aOM<Response_MemoriesUsage>(21, _omitFieldNames ? '' : 'memoriesUsage',
|
..aOM<Response_MemoriesUsage>(21, _omitFieldNames ? '' : 'memoriesUsage',
|
||||||
subBuilder: Response_MemoriesUsage.create)
|
subBuilder: Response_MemoriesUsage.create)
|
||||||
|
..aOM<Response_PrivacyPassParameters>(
|
||||||
|
22, _omitFieldNames ? '' : 'privacyPassParameters',
|
||||||
|
subBuilder: Response_PrivacyPassParameters.create)
|
||||||
|
..aOM<Response_PrivacyPassTokenResponses>(
|
||||||
|
23, _omitFieldNames ? '' : 'privacyPassTokenResponses',
|
||||||
|
subBuilder: Response_PrivacyPassTokenResponses.create)
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
|
@ -2499,6 +2877,8 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(19)
|
@$pb.TagNumber(19)
|
||||||
@$pb.TagNumber(20)
|
@$pb.TagNumber(20)
|
||||||
@$pb.TagNumber(21)
|
@$pb.TagNumber(21)
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
@$pb.TagNumber(23)
|
||||||
Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!;
|
Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!;
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
|
|
@ -2519,6 +2899,8 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
@$pb.TagNumber(19)
|
@$pb.TagNumber(19)
|
||||||
@$pb.TagNumber(20)
|
@$pb.TagNumber(20)
|
||||||
@$pb.TagNumber(21)
|
@$pb.TagNumber(21)
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
@$pb.TagNumber(23)
|
||||||
void clearOk() => $_clearField($_whichOneof(0));
|
void clearOk() => $_clearField($_whichOneof(0));
|
||||||
|
|
||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
|
|
@ -2726,6 +3108,32 @@ class Response_Ok extends $pb.GeneratedMessage {
|
||||||
void clearMemoriesUsage() => $_clearField(21);
|
void clearMemoriesUsage() => $_clearField(21);
|
||||||
@$pb.TagNumber(21)
|
@$pb.TagNumber(21)
|
||||||
Response_MemoriesUsage ensureMemoriesUsage() => $_ensure(18);
|
Response_MemoriesUsage ensureMemoriesUsage() => $_ensure(18);
|
||||||
|
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
Response_PrivacyPassParameters get privacyPassParameters => $_getN(19);
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
set privacyPassParameters(Response_PrivacyPassParameters value) =>
|
||||||
|
$_setField(22, value);
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
$core.bool hasPrivacyPassParameters() => $_has(19);
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
void clearPrivacyPassParameters() => $_clearField(22);
|
||||||
|
@$pb.TagNumber(22)
|
||||||
|
Response_PrivacyPassParameters ensurePrivacyPassParameters() => $_ensure(19);
|
||||||
|
|
||||||
|
@$pb.TagNumber(23)
|
||||||
|
Response_PrivacyPassTokenResponses get privacyPassTokenResponses =>
|
||||||
|
$_getN(20);
|
||||||
|
@$pb.TagNumber(23)
|
||||||
|
set privacyPassTokenResponses(Response_PrivacyPassTokenResponses value) =>
|
||||||
|
$_setField(23, value);
|
||||||
|
@$pb.TagNumber(23)
|
||||||
|
$core.bool hasPrivacyPassTokenResponses() => $_has(20);
|
||||||
|
@$pb.TagNumber(23)
|
||||||
|
void clearPrivacyPassTokenResponses() => $_clearField(23);
|
||||||
|
@$pb.TagNumber(23)
|
||||||
|
Response_PrivacyPassTokenResponses ensurePrivacyPassTokenResponses() =>
|
||||||
|
$_ensure(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Response_Response { ok, error, notSet }
|
enum Response_Response { ok, error, notSet }
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,24 @@ const V0$json = {
|
||||||
'9': 0,
|
'9': 0,
|
||||||
'10': 'error'
|
'10': 'error'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'1': 'sealedSenderMessage',
|
||||||
|
'3': 9,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.server_to_client.SealedSenderMessage',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'sealedSenderMessage'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'1': 'sealedSenderMessages',
|
||||||
|
'3': 10,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.server_to_client.SealedSenderMessages',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'sealedSenderMessages'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'8': [
|
'8': [
|
||||||
{'1': 'Kind'},
|
{'1': 'Kind'},
|
||||||
|
|
@ -110,7 +128,10 @@ final $typed_data.Uint8List v0Descriptor = $convert.base64Decode(
|
||||||
'0uc2VydmVyX3RvX2NsaWVudC5OZXdNZXNzYWdlc0gAUgtuZXdNZXNzYWdlcxIuChFSZXF1ZXN0'
|
'0uc2VydmVyX3RvX2NsaWVudC5OZXdNZXNzYWdlc0gAUgtuZXdNZXNzYWdlcxIuChFSZXF1ZXN0'
|
||||||
'TmV3UHJlS2V5cxgEIAEoCEgAUhFSZXF1ZXN0TmV3UHJlS2V5cxI0ChRSZXF1ZXN0TmV3UHFjUH'
|
'TmV3UHJlS2V5cxgEIAEoCEgAUhFSZXF1ZXN0TmV3UHJlS2V5cxI0ChRSZXF1ZXN0TmV3UHFjUH'
|
||||||
'JlS2V5cxgIIAEoCEgAUhRSZXF1ZXN0TmV3UHFjUHJlS2V5cxIoCgVlcnJvchgGIAEoDjIQLmVy'
|
'JlS2V5cxgIIAEoCEgAUhRSZXF1ZXN0TmV3UHFjUHJlS2V5cxIoCgVlcnJvchgGIAEoDjIQLmVy'
|
||||||
'cm9yLkVycm9yQ29kZUgAUgVlcnJvckIGCgRLaW5k');
|
'cm9yLkVycm9yQ29kZUgAUgVlcnJvchJZChNzZWFsZWRTZW5kZXJNZXNzYWdlGAkgASgLMiUuc2'
|
||||||
|
'VydmVyX3RvX2NsaWVudC5TZWFsZWRTZW5kZXJNZXNzYWdlSABSE3NlYWxlZFNlbmRlck1lc3Nh'
|
||||||
|
'Z2USXAoUc2VhbGVkU2VuZGVyTWVzc2FnZXMYCiABKAsyJi5zZXJ2ZXJfdG9fY2xpZW50LlNlYW'
|
||||||
|
'xlZFNlbmRlck1lc3NhZ2VzSABSFHNlYWxlZFNlbmRlck1lc3NhZ2VzQgYKBEtpbmQ=');
|
||||||
|
|
||||||
@$core.Deprecated('Use newMessageDescriptor instead')
|
@$core.Deprecated('Use newMessageDescriptor instead')
|
||||||
const NewMessage$json = {
|
const NewMessage$json = {
|
||||||
|
|
@ -146,6 +167,40 @@ final $typed_data.Uint8List newMessagesDescriptor = $convert.base64Decode(
|
||||||
'CgtOZXdNZXNzYWdlcxI+CgtuZXdNZXNzYWdlcxgBIAMoCzIcLnNlcnZlcl90b19jbGllbnQuTm'
|
'CgtOZXdNZXNzYWdlcxI+CgtuZXdNZXNzYWdlcxgBIAMoCzIcLnNlcnZlcl90b19jbGllbnQuTm'
|
||||||
'V3TWVzc2FnZVILbmV3TWVzc2FnZXM=');
|
'V3TWVzc2FnZVILbmV3TWVzc2FnZXM=');
|
||||||
|
|
||||||
|
@$core.Deprecated('Use sealedSenderMessageDescriptor instead')
|
||||||
|
const SealedSenderMessage$json = {
|
||||||
|
'1': 'SealedSenderMessage',
|
||||||
|
'2': [
|
||||||
|
{'1': 'message_id', '3': 1, '4': 1, '5': 9, '10': 'messageId'},
|
||||||
|
{'1': 'body', '3': 2, '4': 1, '5': 12, '10': 'body'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Descriptor for `SealedSenderMessage`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
|
final $typed_data.Uint8List sealedSenderMessageDescriptor = $convert.base64Decode(
|
||||||
|
'ChNTZWFsZWRTZW5kZXJNZXNzYWdlEh0KCm1lc3NhZ2VfaWQYASABKAlSCW1lc3NhZ2VJZBISCg'
|
||||||
|
'Rib2R5GAIgASgMUgRib2R5');
|
||||||
|
|
||||||
|
@$core.Deprecated('Use sealedSenderMessagesDescriptor instead')
|
||||||
|
const SealedSenderMessages$json = {
|
||||||
|
'1': 'SealedSenderMessages',
|
||||||
|
'2': [
|
||||||
|
{
|
||||||
|
'1': 'messages',
|
||||||
|
'3': 1,
|
||||||
|
'4': 3,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.server_to_client.SealedSenderMessage',
|
||||||
|
'10': 'messages'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Descriptor for `SealedSenderMessages`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
|
final $typed_data.Uint8List sealedSenderMessagesDescriptor = $convert.base64Decode(
|
||||||
|
'ChRTZWFsZWRTZW5kZXJNZXNzYWdlcxJBCghtZXNzYWdlcxgBIAMoCzIlLnNlcnZlcl90b19jbG'
|
||||||
|
'llbnQuU2VhbGVkU2VuZGVyTWVzc2FnZVIIbWVzc2FnZXM=');
|
||||||
|
|
||||||
@$core.Deprecated('Use responseDescriptor instead')
|
@$core.Deprecated('Use responseDescriptor instead')
|
||||||
const Response$json = {
|
const Response$json = {
|
||||||
'1': 'Response',
|
'1': 'Response',
|
||||||
|
|
@ -194,6 +249,8 @@ const Response$json = {
|
||||||
Response_MemoriesList$json,
|
Response_MemoriesList$json,
|
||||||
Response_MemoriesUrl$json,
|
Response_MemoriesUrl$json,
|
||||||
Response_MemoriesUsage$json,
|
Response_MemoriesUsage$json,
|
||||||
|
Response_PrivacyPassParameters$json,
|
||||||
|
Response_PrivacyPassTokenResponses$json,
|
||||||
Response_Ok$json
|
Response_Ok$json
|
||||||
],
|
],
|
||||||
'8': [
|
'8': [
|
||||||
|
|
@ -750,6 +807,39 @@ const Response_MemoriesUsage$json = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@$core.Deprecated('Use responseDescriptor instead')
|
||||||
|
const Response_PrivacyPassParameters$json = {
|
||||||
|
'1': 'PrivacyPassParameters',
|
||||||
|
'2': [
|
||||||
|
{'1': 'token_challenge', '3': 1, '4': 1, '5': 12, '10': 'tokenChallenge'},
|
||||||
|
{'1': 'public_key', '3': 2, '4': 1, '5': 12, '10': 'publicKey'},
|
||||||
|
{'1': 'max_batch_size', '3': 3, '4': 1, '5': 13, '10': 'maxBatchSize'},
|
||||||
|
{'1': 'max_age_seconds', '3': 4, '4': 1, '5': 13, '10': 'maxAgeSeconds'},
|
||||||
|
{
|
||||||
|
'1': 'daily_token_limit',
|
||||||
|
'3': 5,
|
||||||
|
'4': 1,
|
||||||
|
'5': 13,
|
||||||
|
'10': 'dailyTokenLimit'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'1': 'issuance_cooldown_seconds',
|
||||||
|
'3': 6,
|
||||||
|
'4': 1,
|
||||||
|
'5': 13,
|
||||||
|
'10': 'issuanceCooldownSeconds'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
@$core.Deprecated('Use responseDescriptor instead')
|
||||||
|
const Response_PrivacyPassTokenResponses$json = {
|
||||||
|
'1': 'PrivacyPassTokenResponses',
|
||||||
|
'2': [
|
||||||
|
{'1': 'token_responses', '3': 1, '4': 3, '5': 12, '10': 'tokenResponses'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
@$core.Deprecated('Use responseDescriptor instead')
|
@$core.Deprecated('Use responseDescriptor instead')
|
||||||
const Response_Ok$json = {
|
const Response_Ok$json = {
|
||||||
'1': 'Ok',
|
'1': 'Ok',
|
||||||
|
|
@ -899,6 +989,24 @@ const Response_Ok$json = {
|
||||||
'9': 0,
|
'9': 0,
|
||||||
'10': 'memoriesUsage'
|
'10': 'memoriesUsage'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'1': 'privacy_pass_parameters',
|
||||||
|
'3': 22,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.server_to_client.Response.PrivacyPassParameters',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'privacyPassParameters'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'1': 'privacy_pass_token_responses',
|
||||||
|
'3': 23,
|
||||||
|
'4': 1,
|
||||||
|
'5': 11,
|
||||||
|
'6': '.server_to_client.Response.PrivacyPassTokenResponses',
|
||||||
|
'9': 0,
|
||||||
|
'10': 'privacyPassTokenResponses'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'8': [
|
'8': [
|
||||||
{'1': 'Ok'},
|
{'1': 'Ok'},
|
||||||
|
|
@ -988,29 +1096,40 @@ final $typed_data.Uint8List responseDescriptor = $convert.base64Decode(
|
||||||
'ZGlhSXRlbVIFaXRlbXMaOQoLTWVtb3JpZXNVcmwSKgoRZnVsbF9kb3dubG9hZF91cmwYASABKA'
|
'ZGlhSXRlbVIFaXRlbXMaOQoLTWVtb3JpZXNVcmwSKgoRZnVsbF9kb3dubG9hZF91cmwYASABKA'
|
||||||
'lSD2Z1bGxEb3dubG9hZFVybBpnCg1NZW1vcmllc1VzYWdlEhsKCW1heF9ieXRlcxgBIAEoA1II'
|
'lSD2Z1bGxEb3dubG9hZFVybBpnCg1NZW1vcmllc1VzYWdlEhsKCW1heF9ieXRlcxgBIAEoA1II'
|
||||||
'bWF4Qnl0ZXMSIwoNY3VycmVudF9ieXRlcxgCIAEoA1IMY3VycmVudEJ5dGVzEhQKBWNvdW50GA'
|
'bWF4Qnl0ZXMSIwoNY3VycmVudF9ieXRlcxgCIAEoA1IMY3VycmVudEJ5dGVzEhQKBWNvdW50GA'
|
||||||
'MgASgDUgVjb3VudBr1CgoCT2sSFAoETm9uZRgBIAEoCEgAUgROb25lEhgKBnVzZXJpZBgCIAEo'
|
'MgASgDUgVjb3VudBqVAgoVUHJpdmFjeVBhc3NQYXJhbWV0ZXJzEicKD3Rva2VuX2NoYWxsZW5n'
|
||||||
'A0gAUgZ1c2VyaWQSJgoNYXV0aGNoYWxsZW5nZRgDIAEoDEgAUg1hdXRoY2hhbGxlbmdlEkoKC3'
|
'ZRgBIAEoDFIOdG9rZW5DaGFsbGVuZ2USHQoKcHVibGljX2tleRgCIAEoDFIJcHVibGljS2V5Ei'
|
||||||
'VwbG9hZHRva2VuGAQgASgLMiYuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5VcGxvYWRUb2tl'
|
'QKDm1heF9iYXRjaF9zaXplGAMgASgNUgxtYXhCYXRjaFNpemUSJgoPbWF4X2FnZV9zZWNvbmRz'
|
||||||
'bkgAUgt1cGxvYWR0b2tlbhJBCgh1c2VyZGF0YRgFIAEoCzIjLnNlcnZlcl90b19jbGllbnQuUm'
|
'GAQgASgNUg1tYXhBZ2VTZWNvbmRzEioKEWRhaWx5X3Rva2VuX2xpbWl0GAUgASgNUg9kYWlseV'
|
||||||
'VzcG9uc2UuVXNlckRhdGFIAFIIdXNlcmRhdGESHgoJYXV0aHRva2VuGAYgASgMSABSCWF1dGh0'
|
'Rva2VuTGltaXQSOgoZaXNzdWFuY2VfY29vbGRvd25fc2Vjb25kcxgGIAEoDVIXaXNzdWFuY2VD'
|
||||||
'b2tlbhJQCg1hdXRoZW50aWNhdGVkGAggASgLMiguc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS'
|
'b29sZG93blNlY29uZHMaRAoZUHJpdmFjeVBhc3NUb2tlblJlc3BvbnNlcxInCg90b2tlbl9yZX'
|
||||||
'5BdXRoZW50aWNhdGVkSABSDWF1dGhlbnRpY2F0ZWQSOAoFcGxhbnMYCSABKAsyIC5zZXJ2ZXJf'
|
'Nwb25zZXMYASADKAxSDnRva2VuUmVzcG9uc2VzGtoMCgJPaxIUCgROb25lGAEgASgISABSBE5v'
|
||||||
'dG9fY2xpZW50LlJlc3BvbnNlLlBsYW5zSABSBXBsYW5zEk0KDHBsYW5iYWxsYW5jZRgKIAEoCz'
|
'bmUSGAoGdXNlcmlkGAIgASgDSABSBnVzZXJpZBImCg1hdXRoY2hhbGxlbmdlGAMgASgMSABSDW'
|
||||||
'InLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUGxhbkJhbGxhbmNlSABSDHBsYW5iYWxsYW5j'
|
'F1dGhjaGFsbGVuZ2USSgoLdXBsb2FkdG9rZW4YBCABKAsyJi5zZXJ2ZXJfdG9fY2xpZW50LlJl'
|
||||||
'ZRJfChJhZGRhY2NvdW50c2ludml0ZXMYDCABKAsyLS5zZXJ2ZXJfdG9fY2xpZW50LlJlc3Bvbn'
|
'c3BvbnNlLlVwbG9hZFRva2VuSABSC3VwbG9hZHRva2VuEkEKCHVzZXJkYXRhGAUgASgLMiMuc2'
|
||||||
'NlLkFkZEFjY291bnRzSW52aXRlc0gAUhJhZGRhY2NvdW50c2ludml0ZXMSUwoOZG93bmxvYWR0'
|
'VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5Vc2VyRGF0YUgAUgh1c2VyZGF0YRIeCglhdXRodG9r'
|
||||||
'b2tlbnMYDSABKAsyKS5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLkRvd25sb2FkVG9rZW5zSA'
|
'ZW4YBiABKAxIAFIJYXV0aHRva2VuElAKDWF1dGhlbnRpY2F0ZWQYCCABKAsyKC5zZXJ2ZXJfdG'
|
||||||
'BSDmRvd25sb2FkdG9rZW5zEk0KDHNpZ25lZHByZWtleRgOIAEoCzInLnNlcnZlcl90b19jbGll'
|
'9fY2xpZW50LlJlc3BvbnNlLkF1dGhlbnRpY2F0ZWRIAFINYXV0aGVudGljYXRlZBI4CgVwbGFu'
|
||||||
'bnQuUmVzcG9uc2UuU2lnbmVkUHJlS2V5SABSDHNpZ25lZHByZWtleRJKCgtwcm9vZk9mV29yax'
|
'cxgJIAEoCzIgLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUGxhbnNIAFIFcGxhbnMSTQoMcG'
|
||||||
'gPIAEoCzImLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUHJvb2ZPZldvcmtIAFILcHJvb2ZP'
|
'xhbmJhbGxhbmNlGAogASgLMicuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5QbGFuQmFsbGFu'
|
||||||
'ZldvcmsSSQogcGFzc3dvcmRsZXNzX3JlY292ZXJ5X3NlcnZlcl9rZXkYECABKAxIAFIdcGFzc3'
|
'Y2VIAFIMcGxhbmJhbGxhbmNlEl8KEmFkZGFjY291bnRzaW52aXRlcxgMIAEoCzItLnNlcnZlcl'
|
||||||
'dvcmRsZXNzUmVjb3ZlcnlTZXJ2ZXJLZXkSiwEKInBhc3N3b3JkbGVzc19ub3RpZmljYXRpb25f'
|
'90b19jbGllbnQuUmVzcG9uc2UuQWRkQWNjb3VudHNJbnZpdGVzSABSEmFkZGFjY291bnRzaW52'
|
||||||
'bWVzc2FnZXMYESABKAsyOy5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlBhc3N3b3JkbGVzc0'
|
'aXRlcxJTCg5kb3dubG9hZHRva2VucxgNIAEoCzIpLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2'
|
||||||
'5vdGlmaWNhdGlvbk1lc3NhZ2VzSABSIHBhc3N3b3JkbGVzc05vdGlmaWNhdGlvbk1lc3NhZ2Vz'
|
'UuRG93bmxvYWRUb2tlbnNIAFIOZG93bmxvYWR0b2tlbnMSTQoMc2lnbmVkcHJla2V5GA4gASgL'
|
||||||
'EmEKFG1lbW9yaWVzX3VwbG9hZF91cmxzGBIgASgLMi0uc2VydmVyX3RvX2NsaWVudC5SZXNwb2'
|
'Micuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5TaWduZWRQcmVLZXlIAFIMc2lnbmVkcHJla2'
|
||||||
'5zZS5NZW1vcmllc1VwbG9hZFVybHNIAFISbWVtb3JpZXNVcGxvYWRVcmxzEk4KDW1lbW9yaWVz'
|
'V5EkoKC3Byb29mT2ZXb3JrGA8gASgLMiYuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5Qcm9v'
|
||||||
'X2xpc3QYEyABKAsyJy5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLk1lbW9yaWVzTGlzdEgAUg'
|
'Zk9mV29ya0gAUgtwcm9vZk9mV29yaxJJCiBwYXNzd29yZGxlc3NfcmVjb3Zlcnlfc2VydmVyX2'
|
||||||
'xtZW1vcmllc0xpc3QSSwoMbWVtb3JpZXNfdXJsGBQgASgLMiYuc2VydmVyX3RvX2NsaWVudC5S'
|
'tleRgQIAEoDEgAUh1wYXNzd29yZGxlc3NSZWNvdmVyeVNlcnZlcktleRKLAQoicGFzc3dvcmRs'
|
||||||
'ZXNwb25zZS5NZW1vcmllc1VybEgAUgttZW1vcmllc1VybBJRCg5tZW1vcmllc191c2FnZRgVIA'
|
'ZXNzX25vdGlmaWNhdGlvbl9tZXNzYWdlcxgRIAEoCzI7LnNlcnZlcl90b19jbGllbnQuUmVzcG'
|
||||||
'EoCzIoLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuTWVtb3JpZXNVc2FnZUgAUg1tZW1vcmll'
|
'9uc2UuUGFzc3dvcmRsZXNzTm90aWZpY2F0aW9uTWVzc2FnZXNIAFIgcGFzc3dvcmRsZXNzTm90'
|
||||||
'c1VzYWdlQgQKAk9rSgQIBxAISgQICxAMQgoKCFJlc3BvbnNl');
|
'aWZpY2F0aW9uTWVzc2FnZXMSYQoUbWVtb3JpZXNfdXBsb2FkX3VybHMYEiABKAsyLS5zZXJ2ZX'
|
||||||
|
'JfdG9fY2xpZW50LlJlc3BvbnNlLk1lbW9yaWVzVXBsb2FkVXJsc0gAUhJtZW1vcmllc1VwbG9h'
|
||||||
|
'ZFVybHMSTgoNbWVtb3JpZXNfbGlzdBgTIAEoCzInLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2'
|
||||||
|
'UuTWVtb3JpZXNMaXN0SABSDG1lbW9yaWVzTGlzdBJLCgxtZW1vcmllc191cmwYFCABKAsyJi5z'
|
||||||
|
'ZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLk1lbW9yaWVzVXJsSABSC21lbW9yaWVzVXJsElEKDm'
|
||||||
|
'1lbW9yaWVzX3VzYWdlGBUgASgLMiguc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5NZW1vcmll'
|
||||||
|
'c1VzYWdlSABSDW1lbW9yaWVzVXNhZ2USagoXcHJpdmFjeV9wYXNzX3BhcmFtZXRlcnMYFiABKA'
|
||||||
|
'syMC5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlByaXZhY3lQYXNzUGFyYW1ldGVyc0gAUhVw'
|
||||||
|
'cml2YWN5UGFzc1BhcmFtZXRlcnMSdwoccHJpdmFjeV9wYXNzX3Rva2VuX3Jlc3BvbnNlcxgXIA'
|
||||||
|
'EoCzI0LnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUHJpdmFjeVBhc3NUb2tlblJlc3BvbnNl'
|
||||||
|
'c0gAUhlwcml2YWN5UGFzc1Rva2VuUmVzcG9uc2VzQgQKAk9rSgQIBxAISgQICxAMQgoKCFJlc3'
|
||||||
|
'BvbnNl');
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@ class AndroidPhotoPickerService {
|
||||||
/// Reads the raw bytes from a content URI using the Android ContentResolver.
|
/// Reads the raw bytes from a content URI using the Android ContentResolver.
|
||||||
static Future<Uint8List?> getUriBytes(String uri) async {
|
static Future<Uint8List?> getUriBytes(String uri) async {
|
||||||
try {
|
try {
|
||||||
final bytes = await _channel.invokeMethod<Uint8List>('getUriBytes', {'uri': uri});
|
final bytes = await _channel.invokeMethod<Uint8List>('getUriBytes', {
|
||||||
|
'uri': uri,
|
||||||
|
});
|
||||||
return bytes;
|
return bytes;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ import 'package:flutter/foundation.dart';
|
||||||
import 'package:libsignal_protocol_dart/src/ecc/ed25519.dart';
|
import 'package:libsignal_protocol_dart/src/ecc/ed25519.dart';
|
||||||
import 'package:mutex/mutex.dart';
|
import 'package:mutex/mutex.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
import 'package:twonly/core/bridge/api.dart' as rust_api;
|
||||||
|
import 'package:twonly/core/bridge/api.dart';
|
||||||
import 'package:twonly/core/bridge/wrapper/key_manager.dart';
|
import 'package:twonly/core/bridge/wrapper/key_manager.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
import 'package:twonly/locator.dart';
|
import 'package:twonly/locator.dart';
|
||||||
|
|
@ -59,6 +61,41 @@ final lockAuthentication = Mutex();
|
||||||
/// errors or network changes.
|
/// errors or network changes.
|
||||||
class ApiService {
|
class ApiService {
|
||||||
ApiService();
|
ApiService();
|
||||||
|
Future<Result> _rustCall<T>(Future<T> promise) async {
|
||||||
|
try {
|
||||||
|
final res = await promise;
|
||||||
|
if (res is ServerResultEmpty) {
|
||||||
|
final r = res as ServerResultEmpty;
|
||||||
|
return await r.map(
|
||||||
|
ok: (_) => Result.success(null),
|
||||||
|
errorCode: (e) => Result.error(ErrorCode.valueOf(e.field0)),
|
||||||
|
);
|
||||||
|
} else if (res is ServerResultVecU8) {
|
||||||
|
final r = res as ServerResultVecU8;
|
||||||
|
return await r.map(
|
||||||
|
ok: (ok) => Result.success(ok.field0),
|
||||||
|
errorCode: (e) => Result.error(ErrorCode.valueOf(e.field0)),
|
||||||
|
);
|
||||||
|
} else if (res is ServerResultI64) {
|
||||||
|
final r = res as ServerResultI64;
|
||||||
|
return await r.map(
|
||||||
|
ok: (ok) => Result.success(ok.field0),
|
||||||
|
errorCode: (e) => Result.error(ErrorCode.valueOf(e.field0)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Result.success(res);
|
||||||
|
} catch (e) {
|
||||||
|
final msg = e.toString();
|
||||||
|
final match = RegExp(r'API error code (\\d+)').firstMatch(msg);
|
||||||
|
if (match != null) {
|
||||||
|
final code = int.parse(match.group(1)!);
|
||||||
|
return Result.error(ErrorCode.valueOf(code));
|
||||||
|
}
|
||||||
|
Log.error('Rust API call failed', error: e);
|
||||||
|
return Result.error(ErrorCode.InternalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final String apiHost = kReleaseMode ? 'api.twonly.eu' : 'dev-api.twonly.eu';
|
final String apiHost = kReleaseMode ? 'api.twonly.eu' : 'dev-api.twonly.eu';
|
||||||
// final String apiHost = kReleaseMode ? 'api.twonly.eu' : 'dev.twonly.eu';
|
// final String apiHost = kReleaseMode ? 'api.twonly.eu' : 'dev.twonly.eu';
|
||||||
final String apiSecure = kReleaseMode ? 's' : 's';
|
final String apiSecure = kReleaseMode ? 's' : 's';
|
||||||
|
|
@ -680,46 +717,35 @@ class ApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Response_UserData?> getUserById(int userId) async {
|
Future<Response_UserData?> getUserById(int userId) async {
|
||||||
final get = ApplicationData_GetUserById()..userId = Int64(userId);
|
final result = await _rustCall(
|
||||||
final appData = ApplicationData()..getUserById = get;
|
rust_api.RustApi.getUserById(userId: userId),
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
);
|
||||||
final res = await sendRequestSync(req);
|
if (result.isSuccess && result.value != null) {
|
||||||
if (res.isSuccess) {
|
return server.Response_UserData.fromBuffer(result.value as List<int>);
|
||||||
final ok = res.value as server.Response_Ok;
|
|
||||||
if (ok.hasUserdata()) {
|
|
||||||
return ok.userdata;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<(Response_ProofOfWork?, bool)> getProofOfWork() async {
|
Future<(Response_ProofOfWork?, bool)> getProofOfWork() async {
|
||||||
final handshake = Handshake()..requestPOW = Handshake_RequestPOW();
|
final result = await _rustCall(rust_api.RustApi.getProofOfWork());
|
||||||
final req = createClientToServerFromHandshake(handshake);
|
if (result.isSuccess && result.value != null) {
|
||||||
final result = await sendRequestSync(req, authenticated: false);
|
return (
|
||||||
if (result.isError) {
|
Response_ProofOfWork.fromBuffer(result.value as List<int>),
|
||||||
Log.error('could not request proof of work params', error: result);
|
false,
|
||||||
if (result.error == ErrorCode.RegistrationDisabled) {
|
);
|
||||||
return (null, true);
|
|
||||||
}
|
|
||||||
Log.error('could not request proof of work params', error: result);
|
|
||||||
return (null, false);
|
|
||||||
}
|
}
|
||||||
return (result.value.proofOfWork as Response_ProofOfWork, false);
|
if (result.isError && result.error == ErrorCode.RegistrationDisabled) {
|
||||||
|
return (null, true);
|
||||||
|
}
|
||||||
|
return (null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> downloadDone(List<int> token) async {
|
Future<Result> downloadDone(List<int> token) async {
|
||||||
final get = ApplicationData_DownloadDone()..downloadToken = token;
|
return _rustCall(rust_api.RustApi.downloadDone(token: token));
|
||||||
final appData = ApplicationData()..downloadDone = get;
|
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
|
||||||
return sendRequestSync(req, ensureRetransmission: true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> _setLoginToken(List<int> token) async {
|
Future<Result> _setLoginToken(List<int> token) async {
|
||||||
final get = ApplicationData_SetLoginToken()..loginToken = token;
|
return _rustCall(rust_api.RustApi.setLoginToken(token: token));
|
||||||
final appData = ApplicationData()..setLoginToken = get;
|
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
|
||||||
return sendRequestSync(req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<server.Response_MemoriesUploadUrls?> requestMemoriesUpload(
|
Future<server.Response_MemoriesUploadUrls?> requestMemoriesUpload(
|
||||||
|
|
@ -934,19 +960,13 @@ class ApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> reportUser(int userId, String reason) async {
|
Future<Result> reportUser(int userId, String reason) async {
|
||||||
final get = ApplicationData_ReportUser()
|
return _rustCall(
|
||||||
..reportedUserId = Int64(userId)
|
rust_api.RustApi.reportUser(userId: userId, reason: reason),
|
||||||
..reason = reason;
|
);
|
||||||
final appData = ApplicationData()..reportUser = get;
|
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
|
||||||
return sendRequestSync(req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> deleteAccount() async {
|
Future<Result> deleteAccount() async {
|
||||||
final get = ApplicationData_DeleteAccount();
|
return _rustCall(rust_api.RustApi.deleteAccount());
|
||||||
final appData = ApplicationData()..deleteAccount = get;
|
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
|
||||||
return sendRequestSync(req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> updateFCMToken(String googleFcm) async {
|
Future<Result> updateFCMToken(String googleFcm) async {
|
||||||
|
|
@ -973,19 +993,11 @@ class ApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> changeUsername(String username) async {
|
Future<Result> changeUsername(String username) async {
|
||||||
final get = ApplicationData_ChangeUsername()..username = username;
|
return _rustCall(rust_api.RustApi.changeUsername(username: username));
|
||||||
final appData = ApplicationData()..changeUsername = get;
|
|
||||||
final req = createClientToServerFromApplicationData(appData);
|
|
||||||
return sendRequestSync(req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> forceIpaCheck() async {
|
Future<Result> forceIpaCheck() async {
|
||||||
final req = createClientToServerFromApplicationData(
|
return _rustCall(rust_api.RustApi.forceIpaCheck());
|
||||||
ApplicationData(
|
|
||||||
ipaForceCheck: ApplicationData_IPAForceCheck(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return sendRequestSync(req);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Result> updateSignedPreKey(
|
Future<Result> updateSignedPreKey(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:clock/clock.dart';
|
import 'package:clock/clock.dart';
|
||||||
import 'package:drift/drift.dart' show Value;
|
import 'package:drift/drift.dart' show Value;
|
||||||
import 'package:fixnum/fixnum.dart' show Int64;
|
|
||||||
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'
|
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'
|
||||||
show IdentityKeyPair;
|
show IdentityKeyPair;
|
||||||
import 'package:twonly/locator.dart';
|
import 'package:twonly/locator.dart';
|
||||||
|
|
@ -51,10 +50,14 @@ Future<void> handleErrorMessage(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Update group state from the server to ensure the user is still part of the group...
|
// Update group state from the server to ensure the user is still part of the group...
|
||||||
final updatedState = await fetchGroupState(group);
|
final updated = await fetchGroupState(group);
|
||||||
if (updatedState != null) {
|
if (updated) {
|
||||||
final (_, state) = updatedState;
|
final members = await twonlyDB.groupsDao.getGroupNonLeftMembers(
|
||||||
final isStillMember = state.memberIds.contains(Int64(fromUserId));
|
groupId,
|
||||||
|
);
|
||||||
|
final isStillMember = members.any(
|
||||||
|
(member) => member.contactId == fromUserId,
|
||||||
|
);
|
||||||
if (isStillMember) {
|
if (isStillMember) {
|
||||||
final keyPair = IdentityKeyPair.fromSerialized(
|
final keyPair = IdentityKeyPair.fromSerialized(
|
||||||
group.myGroupPrivateKey!,
|
group.myGroupPrivateKey!,
|
||||||
|
|
|
||||||
|
|
@ -51,20 +51,13 @@ Future<void> handleGroupCreate(
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// In this case make a group state update and check if the fromUserId is still a admin. otherwise return with an log error message
|
// In this case make a group state update and check if the fromUserId is still a admin. otherwise return with an log error message
|
||||||
final updatedState = await fetchGroupState(group);
|
final updated = await fetchGroupState(group);
|
||||||
if (updatedState == null) {
|
if (!updated) {
|
||||||
Log.error(
|
Log.error(
|
||||||
'[$receiptId] Received group invite/create for $groupId, but failed to fetch group state from server.',
|
'[$receiptId] Received group invite/create for $groupId, but failed to fetch group state from server.',
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final (_, state) = updatedState;
|
|
||||||
if (!state.adminIds.any((id) => id.toInt() == fromUserId)) {
|
|
||||||
Log.error(
|
|
||||||
'[$receiptId] Received group invite/create for $groupId from $fromUserId, but they are not an admin of this group.',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// User was already in the group, so update leftGroup back to false
|
// User was already in the group, so update leftGroup back to false
|
||||||
await twonlyDB.groupsDao.updateGroup(
|
await twonlyDB.groupsDao.updateGroup(
|
||||||
groupId,
|
groupId,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,11 @@ Future<void> handleMessageUpdate(
|
||||||
Log.warn('[$receiptId] Error handling messages opened: $e');
|
Log.warn('[$receiptId] Error handling messages opened: $e');
|
||||||
}
|
}
|
||||||
case EncryptedContent_MessageUpdate_Type.DELETE:
|
case EncryptedContent_MessageUpdate_Type.DELETE:
|
||||||
if (!await isSender(contactId, messageUpdate.senderMessageId, receiptId)) {
|
if (!await isSender(
|
||||||
|
contactId,
|
||||||
|
messageUpdate.senderMessageId,
|
||||||
|
receiptId,
|
||||||
|
)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.info('[$receiptId] Delete message ${messageUpdate.senderMessageId}');
|
Log.info('[$receiptId] Delete message ${messageUpdate.senderMessageId}');
|
||||||
|
|
@ -38,7 +42,11 @@ Future<void> handleMessageUpdate(
|
||||||
Log.warn('[$receiptId] Error handling message deletion: $e');
|
Log.warn('[$receiptId] Error handling message deletion: $e');
|
||||||
}
|
}
|
||||||
case EncryptedContent_MessageUpdate_Type.EDIT_TEXT:
|
case EncryptedContent_MessageUpdate_Type.EDIT_TEXT:
|
||||||
if (!await isSender(contactId, messageUpdate.senderMessageId, receiptId)) {
|
if (!await isSender(
|
||||||
|
contactId,
|
||||||
|
messageUpdate.senderMessageId,
|
||||||
|
receiptId,
|
||||||
|
)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.info('[$receiptId] Edit message ${messageUpdate.senderMessageId}');
|
Log.info('[$receiptId] Edit message ${messageUpdate.senderMessageId}');
|
||||||
|
|
@ -55,7 +63,11 @@ Future<void> handleMessageUpdate(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> isSender(int fromUserId, String messageId, String receiptId) async {
|
Future<bool> isSender(
|
||||||
|
int fromUserId,
|
||||||
|
String messageId,
|
||||||
|
String receiptId,
|
||||||
|
) async {
|
||||||
final message = await twonlyDB.messagesDao
|
final message = await twonlyDB.messagesDao
|
||||||
.getMessageById(messageId)
|
.getMessageById(messageId)
|
||||||
.getSingleOrNull();
|
.getSingleOrNull();
|
||||||
|
|
@ -63,6 +75,8 @@ Future<bool> isSender(int fromUserId, String messageId, String receiptId) async
|
||||||
if (message.senderId == fromUserId) {
|
if (message.senderId == fromUserId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Log.error('[$receiptId] Contact $fromUserId tried to modify the message $messageId');
|
Log.error(
|
||||||
|
'[$receiptId] Contact $fromUserId tried to modify the message $messageId',
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,9 @@ Future<bool> handleTextMessage(
|
||||||
fromTimestamp(textMessage.timestamp),
|
fromTimestamp(textMessage.timestamp),
|
||||||
);
|
);
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
Log.info('[$receiptId] Inserted a new text message with ID: ${message.messageId}');
|
Log.info(
|
||||||
|
'[$receiptId] Inserted a new text message with ID: ${message.messageId}',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return message != null;
|
return message != null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,9 @@ Future<void> checkForUserDiscoveryChanges(
|
||||||
// Only request a new version once per app session
|
// Only request a new version once per app session
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.info('[$receiptId] Having old version from contact. Requesting new version.');
|
Log.info(
|
||||||
|
'[$receiptId] Having old version from contact. Requesting new version.',
|
||||||
|
);
|
||||||
_requestedUpdates.add(fromUserId);
|
_requestedUpdates.add(fromUserId);
|
||||||
await sendCipherText(
|
await sendCipherText(
|
||||||
fromUserId,
|
fromUserId,
|
||||||
|
|
@ -67,7 +69,9 @@ Future<void> handleUserDiscoveryRequest(
|
||||||
request.currentVersion,
|
request.currentVersion,
|
||||||
);
|
);
|
||||||
if (newMessages != null && newMessages.isNotEmpty) {
|
if (newMessages != null && newMessages.isNotEmpty) {
|
||||||
Log.info('[$receiptId] Sending ${newMessages.length} user discovery messages');
|
Log.info(
|
||||||
|
'[$receiptId] Sending ${newMessages.length} user discovery messages',
|
||||||
|
);
|
||||||
await sendCipherText(
|
await sendCipherText(
|
||||||
fromUserId,
|
fromUserId,
|
||||||
EncryptedContent(
|
EncryptedContent(
|
||||||
|
|
@ -78,7 +82,9 @@ Future<void> handleUserDiscoveryRequest(
|
||||||
blocking: false,
|
blocking: false,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Log.info('[$receiptId] Got update request, but there are no new updates for the user');
|
Log.info(
|
||||||
|
'[$receiptId] Got update request, but there are no new updates for the user',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,7 +97,9 @@ Future<void> handleUserDiscoveryUpdate(
|
||||||
Log.warn('[$receiptId] Got a user discovery update while it is disabled');
|
Log.warn('[$receiptId] Got a user discovery update while it is disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.info('[$receiptId] Got ${update.messages.length} user discovery messages');
|
Log.info(
|
||||||
|
'[$receiptId] Got ${update.messages.length} user discovery messages',
|
||||||
|
);
|
||||||
await UserDiscoveryService.handleNewMessages(
|
await UserDiscoveryService.handleNewMessages(
|
||||||
fromUserId,
|
fromUserId,
|
||||||
update.messages.map(Uint8List.fromList).toList(),
|
update.messages.map(Uint8List.fromList).toList(),
|
||||||
|
|
|
||||||
|
|
@ -1,264 +1,30 @@
|
||||||
import 'dart:async';
|
import 'dart:typed_data';
|
||||||
import 'dart:convert';
|
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:clock/clock.dart';
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'
|
||||||
import 'package:drift/drift.dart';
|
as frb;
|
||||||
import 'package:fixnum/fixnum.dart';
|
import 'package:twonly/core/bridge/api.dart' as rust_api;
|
||||||
import 'package:mutex/mutex.dart';
|
import 'package:twonly/src/database/twonly.db.dart' show Receipt;
|
||||||
import 'package:twonly/locator.dart';
|
|
||||||
import 'package:twonly/src/database/daos/contacts.dao.dart';
|
|
||||||
import 'package:twonly/src/database/tables/contacts.table.dart';
|
|
||||||
import 'package:twonly/src/database/tables/messages.table.dart';
|
|
||||||
import 'package:twonly/src/database/twonly.db.dart';
|
|
||||||
import 'package:twonly/src/model/protobuf/api/websocket/error.pb.dart';
|
|
||||||
import 'package:twonly/src/model/protobuf/client/generated/data.pb.dart';
|
|
||||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||||
as pb;
|
as pb;
|
||||||
import 'package:twonly/src/model/protobuf/client/generated/push_notification.pb.dart';
|
|
||||||
import 'package:twonly/src/services/notifications/pushkeys.notifications.dart';
|
|
||||||
import 'package:twonly/src/services/signal/encryption.signal.dart';
|
|
||||||
import 'package:twonly/src/services/signal/session.signal.dart';
|
|
||||||
import 'package:twonly/src/services/user.service.dart' show UserService;
|
|
||||||
import 'package:twonly/src/services/user_discovery.service.dart';
|
|
||||||
import 'package:twonly/src/utils/log.dart';
|
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
|
||||||
|
|
||||||
final lockRetransmission = Mutex();
|
// Compatibility adapters. All messaging state and behavior lives in Rust.
|
||||||
|
Future<void> retransmitAllMessages() =>
|
||||||
|
rust_api.RustApi.retransmitAllMessages();
|
||||||
|
|
||||||
Future<void> retransmitAllMessages() async {
|
|
||||||
return lockRetransmission.protect(() async {
|
|
||||||
final receipts = await twonlyDB.receiptsDao.getReceiptsForRetransmission();
|
|
||||||
|
|
||||||
if (receipts.isEmpty) return;
|
|
||||||
|
|
||||||
Log.info('Reuploading ${receipts.length} messages to the server.');
|
|
||||||
|
|
||||||
final contacts = <int, Contact>{};
|
|
||||||
|
|
||||||
for (final receipt in receipts) {
|
|
||||||
if (receipt.markForRetryAfterAccepted != null) {
|
|
||||||
if (!contacts.containsKey(receipt.contactId)) {
|
|
||||||
final contact = await twonlyDB.contactsDao
|
|
||||||
.getContactByUserId(receipt.contactId)
|
|
||||||
.getSingleOrNull();
|
|
||||||
if (contact == null) {
|
|
||||||
Log.error(
|
|
||||||
'Contact does not exists, but has a record in receipts, this should not be possible, because of the DELETE CASCADE relation.',
|
|
||||||
);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
contacts[receipt.contactId] = contact;
|
|
||||||
}
|
|
||||||
if (!(contacts[receipt.contactId]?.accepted ?? true)) {
|
|
||||||
Log.warn(
|
|
||||||
'Could not send message as contact has still not yet accepted.',
|
|
||||||
);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await tryToSendCompleteMessage(receipt: receipt);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
final Map<String, Mutex> _tryToSendLocks = {};
|
|
||||||
|
|
||||||
// When the ackByServerAt is set this value is written in the receipted
|
|
||||||
Future<(Uint8List, Uint8List?)?> tryToSendCompleteMessage({
|
Future<(Uint8List, Uint8List?)?> tryToSendCompleteMessage({
|
||||||
String? receiptId,
|
String? receiptId,
|
||||||
Receipt? receipt,
|
Receipt? receipt,
|
||||||
bool onlyReturnEncryptedData = false,
|
bool onlyReturnEncryptedData = false,
|
||||||
bool blocking = true,
|
bool blocking = true,
|
||||||
}) async {
|
}) async {
|
||||||
final rId = receiptId ?? receipt?.receiptId;
|
final id = receiptId ?? receipt?.receiptId;
|
||||||
if (rId == null) {
|
if (id == null) return null;
|
||||||
Log.error(
|
if (!onlyReturnEncryptedData) {
|
||||||
'Cannot try to send complete message as both receiptId and receipt are null.',
|
await rust_api.RustApi.sendQueuedMessage(receiptId: id);
|
||||||
);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
final prepared = await rust_api.RustApi.prepareQueuedMessage(receiptId: id);
|
||||||
final mutex = _tryToSendLocks.putIfAbsent(rId, Mutex.new);
|
return prepared == null ? null : (prepared.message, prepared.pushData);
|
||||||
return mutex.protect(() async {
|
|
||||||
return _tryToSendCompleteMessageInternal(
|
|
||||||
receiptId: receiptId,
|
|
||||||
receipt: receipt,
|
|
||||||
onlyReturnEncryptedData: onlyReturnEncryptedData,
|
|
||||||
blocking: blocking,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<(Uint8List, Uint8List?)?> _tryToSendCompleteMessageInternal({
|
|
||||||
String? receiptId,
|
|
||||||
Receipt? receipt,
|
|
||||||
bool onlyReturnEncryptedData = false,
|
|
||||||
bool blocking = true,
|
|
||||||
}) async {
|
|
||||||
// this should have a lock for every receiptID, split the function into a _internal withou the lock and a normal with the lock
|
|
||||||
if (apiService.appIsOutdated) return null;
|
|
||||||
if (receiptId == null && receipt == null) return null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
final targetReceiptId = receipt?.receiptId ?? receiptId!;
|
|
||||||
final loadedReceipt = await twonlyDB.receiptsDao.getReceiptById(
|
|
||||||
targetReceiptId,
|
|
||||||
);
|
|
||||||
if (loadedReceipt == null) {
|
|
||||||
Log.info(
|
|
||||||
'[$targetReceiptId] Receipt not found (might have been processed or deleted).',
|
|
||||||
);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// ignore: parameter_assignments
|
|
||||||
receipt = loadedReceipt;
|
|
||||||
|
|
||||||
final contact = await twonlyDB.contactsDao.getContactById(
|
|
||||||
receipt.contactId,
|
|
||||||
);
|
|
||||||
if (contact == null || contact.accountDeleted) {
|
|
||||||
Log.warn('Will not send message again as user does not exist anymore.');
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!onlyReturnEncryptedData &&
|
|
||||||
receipt.ackByServerAt != null &&
|
|
||||||
receipt.markForRetry == null) {
|
|
||||||
Log.info('Message already uploaded and mark for retry is not set.');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
final message = pb.Message.fromBuffer(receipt.message)
|
|
||||||
..receiptId = receipt.receiptId;
|
|
||||||
|
|
||||||
final encryptedContent = pb.EncryptedContent.fromBuffer(
|
|
||||||
message.encryptedContent,
|
|
||||||
);
|
|
||||||
|
|
||||||
Uint8List? pushData;
|
|
||||||
if (receipt.retryCount == 0) {
|
|
||||||
final pushNotification = await getPushNotificationFromEncryptedContent(
|
|
||||||
receipt.contactId,
|
|
||||||
receipt.messageId,
|
|
||||||
encryptedContent,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (pushNotification != null) {
|
|
||||||
// Only show the push notification the first two time.
|
|
||||||
pushData = await encryptPushNotification(
|
|
||||||
receipt.contactId,
|
|
||||||
pushNotification,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (message.type == pb.Message_Type.TEST_NOTIFICATION) {
|
|
||||||
pushData = (PushNotification()..kind = PushKind.TEST_NOTIFICATION)
|
|
||||||
.writeToBuffer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (message.type == pb.Message_Type.CIPHERTEXT) {
|
|
||||||
final encryptResult = await signalEncryptMessage(
|
|
||||||
receipt.contactId,
|
|
||||||
Uint8List.fromList(message.encryptedContent),
|
|
||||||
);
|
|
||||||
if (encryptResult == null) {
|
|
||||||
Log.error(
|
|
||||||
'[${receipt.receiptId}] Could not encrypt the message for user ${receipt.contactId}. Aborting and trying again.',
|
|
||||||
);
|
|
||||||
if (receipt.messageId != null) {
|
|
||||||
await twonlyDB.messagesDao.handleMessageAckByServer(
|
|
||||||
receipt.contactId,
|
|
||||||
receipt.messageId!,
|
|
||||||
clock.now(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
message
|
|
||||||
..encryptedContent = encryptResult.ciphertext
|
|
||||||
..type = encryptResult.type;
|
|
||||||
} else if (message.type == pb.Message_Type.CIPHERTEXT_V2) {
|
|
||||||
final encryptResult = await signalEncryptMessageV2(
|
|
||||||
receipt.contactId,
|
|
||||||
Uint8List.fromList(message.encryptedContent),
|
|
||||||
);
|
|
||||||
if (encryptResult == null) {
|
|
||||||
Log.error(
|
|
||||||
'[${receipt.receiptId}] Could not encrypt the message (V2) for user ${receipt.contactId}. Aborting and trying again.',
|
|
||||||
);
|
|
||||||
if (receipt.messageId != null) {
|
|
||||||
await twonlyDB.messagesDao.handleMessageAckByServer(
|
|
||||||
receipt.contactId,
|
|
||||||
receipt.messageId!,
|
|
||||||
clock.now(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
message
|
|
||||||
..encryptedContent = encryptResult.ciphertext
|
|
||||||
..type = encryptResult.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (onlyReturnEncryptedData) {
|
|
||||||
Log.info('Returning message with receiptID ${receipt.receiptId}.');
|
|
||||||
return (message.writeToBuffer(), pushData);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.info('Uploading message with receiptID ${receipt.receiptId}.');
|
|
||||||
|
|
||||||
final resp = await apiService.sendTextMessage(
|
|
||||||
receipt.contactId,
|
|
||||||
message.writeToBuffer(),
|
|
||||||
pushData,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (resp.isError) {
|
|
||||||
Log.warn('Could not transmit ${receipt.receiptId} got ${resp.error}.');
|
|
||||||
if (resp.error == ErrorCode.UserIdNotFound) {
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
await twonlyDB.contactsDao.updateContact(
|
|
||||||
receipt.contactId,
|
|
||||||
const ContactsCompanion(accountDeleted: Value(true)),
|
|
||||||
);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resp.isSuccess) {
|
|
||||||
if (receipt.messageId != null) {
|
|
||||||
await twonlyDB.messagesDao.handleMessageAckByServer(
|
|
||||||
receipt.contactId,
|
|
||||||
receipt.messageId!,
|
|
||||||
clock.now(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!receipt.contactWillSendsReceipt) {
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
} else {
|
|
||||||
await twonlyDB.receiptsDao.updateReceipt(
|
|
||||||
receipt.receiptId,
|
|
||||||
ReceiptsCompanion(
|
|
||||||
ackByServerAt: Value(clock.now()),
|
|
||||||
retryCount: Value(receipt.retryCount + 1),
|
|
||||||
lastRetry: Value(clock.now()),
|
|
||||||
markForRetry: const Value(null),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
Log.error('[$receiptId] unknown error when sending message: $e');
|
|
||||||
if (receipt != null) {
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> insertAndSendTextMessage(
|
Future<void> insertAndSendTextMessage(
|
||||||
|
|
@ -266,41 +32,10 @@ Future<void> insertAndSendTextMessage(
|
||||||
String textMessage,
|
String textMessage,
|
||||||
String? quotesMessageId,
|
String? quotesMessageId,
|
||||||
) async {
|
) async {
|
||||||
await twonlyDB.groupsDao.updateGroup(
|
await rust_api.RustApi.insertAndSendText(
|
||||||
groupId,
|
groupId: groupId,
|
||||||
const GroupsCompanion(
|
text: textMessage,
|
||||||
draftMessage: Value(null),
|
quoteMessageId: quotesMessageId,
|
||||||
),
|
|
||||||
);
|
|
||||||
final message = await twonlyDB.messagesDao.insertMessage(
|
|
||||||
MessagesCompanion(
|
|
||||||
groupId: Value(groupId),
|
|
||||||
content: Value(textMessage),
|
|
||||||
type: Value(MessageType.text.name),
|
|
||||||
quotesMessageId: Value(quotesMessageId),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
if (message == null) {
|
|
||||||
Log.error('Could not insert message into database');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final encryptedContent = pb.EncryptedContent(
|
|
||||||
textMessage: pb.EncryptedContent_TextMessage(
|
|
||||||
senderMessageId: message.messageId,
|
|
||||||
text: textMessage,
|
|
||||||
timestamp: Int64(message.createdAt.millisecondsSinceEpoch),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (quotesMessageId != null) {
|
|
||||||
encryptedContent.textMessage.quoteMessageId = quotesMessageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
await sendCipherTextToGroup(
|
|
||||||
groupId,
|
|
||||||
encryptedContent,
|
|
||||||
messageId: message.messageId,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -308,54 +43,9 @@ Future<void> insertAndSendContactShareMessage(
|
||||||
String groupId,
|
String groupId,
|
||||||
List<int> contactsToShare,
|
List<int> contactsToShare,
|
||||||
) async {
|
) async {
|
||||||
final contacts = <SharedContact>[];
|
await rust_api.RustApi.insertAndSendContactShare(
|
||||||
|
groupId: groupId,
|
||||||
for (final contactId in contactsToShare) {
|
contactIds: frb.Int64List.fromList(contactsToShare),
|
||||||
final contact = await twonlyDB.contactsDao.getContactById(contactId);
|
|
||||||
if (contact != null) {
|
|
||||||
final publicIdentityKey = await getPublicKeyFromContact(contactId);
|
|
||||||
|
|
||||||
contacts.add(
|
|
||||||
SharedContact(
|
|
||||||
userId: Int64(contact.userId),
|
|
||||||
publicIdentityKey: publicIdentityKey,
|
|
||||||
displayName: getContactDisplayName(contact),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final additionalMessageData = AdditionalMessageData(
|
|
||||||
type: AdditionalMessageData_Type.CONTACTS,
|
|
||||||
contacts: contacts,
|
|
||||||
);
|
|
||||||
|
|
||||||
final message = await twonlyDB.messagesDao.insertMessage(
|
|
||||||
MessagesCompanion(
|
|
||||||
groupId: Value(groupId),
|
|
||||||
type: Value(MessageType.contacts.name),
|
|
||||||
additionalMessageData: Value(additionalMessageData.writeToBuffer()),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (message == null) {
|
|
||||||
Log.error('Could not insert message into database');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final encryptedContent = pb.EncryptedContent(
|
|
||||||
additionalDataMessage: pb.EncryptedContent_AdditionalDataMessage(
|
|
||||||
senderMessageId: message.messageId,
|
|
||||||
additionalMessageData: additionalMessageData.writeToBuffer(),
|
|
||||||
timestamp: Int64(message.createdAt.millisecondsSinceEpoch),
|
|
||||||
type: MessageType.contacts.name,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
await sendCipherTextToGroup(
|
|
||||||
groupId,
|
|
||||||
encryptedContent,
|
|
||||||
messageId: message.messageId,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -363,47 +53,9 @@ Future<void> insertAndSendAskAboutUserMessage(
|
||||||
int contactId,
|
int contactId,
|
||||||
int askAboutUserId,
|
int askAboutUserId,
|
||||||
) async {
|
) async {
|
||||||
final directChat = await twonlyDB.groupsDao.createOrGetDirectChat(contactId);
|
await rust_api.RustApi.insertAndSendAskAboutUser(
|
||||||
if (directChat == null) {
|
contactId: contactId,
|
||||||
Log.error(
|
askAboutUserId: askAboutUserId,
|
||||||
'Failed to get or create direct chat group for contact $contactId',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final groupId = directChat.groupId;
|
|
||||||
|
|
||||||
final additionalMessageData = AdditionalMessageData(
|
|
||||||
type: AdditionalMessageData_Type.ASK_ABOUT_USER,
|
|
||||||
askAboutUserId: Int64(askAboutUserId),
|
|
||||||
);
|
|
||||||
|
|
||||||
final message = await twonlyDB.messagesDao.insertMessage(
|
|
||||||
MessagesCompanion(
|
|
||||||
groupId: Value(groupId),
|
|
||||||
type: Value(MessageType.askAboutUser.name),
|
|
||||||
additionalMessageData: Value(additionalMessageData.writeToBuffer()),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (message == null) {
|
|
||||||
Log.error('Could not insert message into database');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final encryptedContent = pb.EncryptedContent(
|
|
||||||
additionalDataMessage: pb.EncryptedContent_AdditionalDataMessage(
|
|
||||||
senderMessageId: message.messageId,
|
|
||||||
additionalMessageData: additionalMessageData.writeToBuffer(),
|
|
||||||
timestamp: Int64(message.createdAt.millisecondsSinceEpoch),
|
|
||||||
type: MessageType.askAboutUser.name,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
await sendCipherTextToGroup(
|
|
||||||
groupId,
|
|
||||||
encryptedContent,
|
|
||||||
messageId: message.messageId,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -413,27 +65,12 @@ Future<void> sendCipherTextToGroup(
|
||||||
String? messageId,
|
String? messageId,
|
||||||
bool onlySendIfNoReceiptsAreOpen = false,
|
bool onlySendIfNoReceiptsAreOpen = false,
|
||||||
}) async {
|
}) async {
|
||||||
final groupMembers = await twonlyDB.groupsDao.getGroupNonLeftMembers(groupId);
|
await rust_api.RustApi.sendEncryptedContentToGroup(
|
||||||
|
groupId: groupId,
|
||||||
if (messageId != null ||
|
content: encryptedContent.writeToBuffer(),
|
||||||
encryptedContent.hasReaction() ||
|
messageId: messageId,
|
||||||
encryptedContent.hasMedia() ||
|
onlySendIfNoReceiptsAreOpen: onlySendIfNoReceiptsAreOpen,
|
||||||
encryptedContent.hasTextMessage()) {
|
);
|
||||||
// only update the counter in case this is a actual message
|
|
||||||
await twonlyDB.groupsDao.increaseLastMessageExchange(groupId, clock.now());
|
|
||||||
}
|
|
||||||
|
|
||||||
encryptedContent.groupId = groupId;
|
|
||||||
|
|
||||||
for (final groupMember in groupMembers) {
|
|
||||||
await sendCipherText(
|
|
||||||
groupMember.contactId,
|
|
||||||
encryptedContent,
|
|
||||||
messageId: messageId,
|
|
||||||
blocking: false,
|
|
||||||
onlySendIfNoReceiptsAreOpen: onlySendIfNoReceiptsAreOpen,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<(Uint8List, Uint8List?)?> sendCipherText(
|
Future<(Uint8List, Uint8List?)?> sendCipherText(
|
||||||
|
|
@ -444,190 +81,28 @@ Future<(Uint8List, Uint8List?)?> sendCipherText(
|
||||||
String? messageId,
|
String? messageId,
|
||||||
bool onlySendIfNoReceiptsAreOpen = false,
|
bool onlySendIfNoReceiptsAreOpen = false,
|
||||||
}) async {
|
}) async {
|
||||||
if (onlySendIfNoReceiptsAreOpen) {
|
final prepared = await rust_api.RustApi.sendEncryptedContent(
|
||||||
final openReceipts = await twonlyDB.receiptsDao.getReceiptCountForContact(
|
contactId: contactId,
|
||||||
contactId,
|
content: encryptedContent.writeToBuffer(),
|
||||||
);
|
messageId: messageId,
|
||||||
if (openReceipts > 10) {
|
onlySendIfNoReceiptsAreOpen: onlySendIfNoReceiptsAreOpen,
|
||||||
// this prevents that these types of messages are send in case the receiver is offline
|
onlyReturnEncryptedData: onlyReturnEncryptedData,
|
||||||
return null;
|
blocking: blocking,
|
||||||
}
|
|
||||||
}
|
|
||||||
encryptedContent.senderProfileCounter = Int64(
|
|
||||||
userService.currentUser.avatarCounter,
|
|
||||||
);
|
);
|
||||||
|
if (!onlyReturnEncryptedData || prepared == null) return null;
|
||||||
{
|
return (prepared.message, prepared.pushData);
|
||||||
if (userService.currentUser.askForFriendPromotions) {
|
|
||||||
final contacts = await twonlyDB.contactsDao.getAllContacts();
|
|
||||||
final contactCount = contacts.where((c) => c.accepted).length;
|
|
||||||
if (contactCount > 5) {
|
|
||||||
await UserService.update((u) {
|
|
||||||
u.askForFriendPromotions = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
encryptedContent.askForFriendPromotions = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userService.currentUser.isUserDiscoveryEnabled && messageId != null) {
|
|
||||||
final contact = await twonlyDB.contactsDao.getContactById(contactId);
|
|
||||||
if (UserDiscoveryService.isContactAllowed(contact)) {
|
|
||||||
final version = await UserDiscoveryService.getCurrentVersion();
|
|
||||||
if (version != null) {
|
|
||||||
encryptedContent.senderUserDiscoveryVersion = version;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final contact = await twonlyDB.contactsDao.getContactById(contactId);
|
|
||||||
final isV2 = contact?.signalVersion == SignalVersion.v2;
|
|
||||||
|
|
||||||
final response = pb.Message()
|
|
||||||
..type = isV2 ? pb.Message_Type.CIPHERTEXT_V2 : pb.Message_Type.CIPHERTEXT
|
|
||||||
..encryptedContent = encryptedContent.writeToBuffer();
|
|
||||||
|
|
||||||
var retryCounter = 0;
|
|
||||||
DateTime? lastRetry;
|
|
||||||
|
|
||||||
if (messageId != null) {
|
|
||||||
final receipts = await twonlyDB.receiptsDao
|
|
||||||
.getReceiptsByContactAndMessageId(contactId, messageId);
|
|
||||||
|
|
||||||
for (final receipt in receipts) {
|
|
||||||
if (receipt.lastRetry != null) {
|
|
||||||
lastRetry = receipt.lastRetry;
|
|
||||||
}
|
|
||||||
retryCounter += 1;
|
|
||||||
Log.info('Removing duplicated receipt for message $messageId');
|
|
||||||
await twonlyDB.receiptsDao.deleteReceipt(receipt.receiptId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final receipt = await twonlyDB.receiptsDao.insertReceipt(
|
|
||||||
ReceiptsCompanion(
|
|
||||||
contactId: Value(contactId),
|
|
||||||
message: Value(response.writeToBuffer()),
|
|
||||||
messageId: Value(messageId),
|
|
||||||
willBeRetriedByMediaUpload: Value(onlyReturnEncryptedData),
|
|
||||||
retryCount: Value(retryCounter),
|
|
||||||
lastRetry: Value(lastRetry),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (receipt != null) {
|
|
||||||
try {
|
|
||||||
final typeKeys = _getEncryptedContentTypes(encryptedContent);
|
|
||||||
Log.info(
|
|
||||||
'sendCipherText: type=[$typeKeys] messageId=$messageId receiptId=${receipt.receiptId}',
|
|
||||||
);
|
|
||||||
} catch (_) {
|
|
||||||
Log.info(
|
|
||||||
'sendCipherText: messageId=$messageId receiptId=${receipt.receiptId}',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
final tmp = tryToSendCompleteMessage(
|
|
||||||
receipt: receipt,
|
|
||||||
onlyReturnEncryptedData: onlyReturnEncryptedData,
|
|
||||||
blocking: blocking,
|
|
||||||
);
|
|
||||||
if (!blocking) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> sendTypingIndication(String groupId, bool isTyping) async {
|
Future<void> sendTypingIndication(String groupId, bool isTyping) =>
|
||||||
if (!userService.currentUser.typingIndicators) return;
|
rust_api.RustApi.sendTyping(groupId: groupId, isTyping: isTyping);
|
||||||
await sendCipherTextToGroup(
|
|
||||||
groupId,
|
|
||||||
pb.EncryptedContent(
|
|
||||||
typingIndicator: pb.EncryptedContent_TypingIndicator(
|
|
||||||
isTyping: isTyping,
|
|
||||||
createdAt: Int64(clock.now().millisecondsSinceEpoch),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onlySendIfNoReceiptsAreOpen: true,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> notifyContactAboutOpeningMessage(
|
Future<void> notifyContactAboutOpeningMessage(
|
||||||
int contactId,
|
int contactId,
|
||||||
List<String> messageOtherIds,
|
List<String> messageOtherIds,
|
||||||
) async {
|
) => rust_api.RustApi.notifyMessagesOpened(
|
||||||
var biggestMessageId = messageOtherIds.first;
|
contactId: contactId,
|
||||||
|
messageIds: messageOtherIds,
|
||||||
|
);
|
||||||
|
|
||||||
for (final messageOtherId in messageOtherIds) {
|
Future<void> sendContactMyProfileData(int contactId) =>
|
||||||
if (isUUIDNewer(messageOtherId, biggestMessageId)) {
|
rust_api.RustApi.sendContactProfile(contactId: contactId);
|
||||||
biggestMessageId = messageOtherId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Log.info('Opened messages: $messageOtherIds');
|
|
||||||
|
|
||||||
final actionAt = clock.now();
|
|
||||||
|
|
||||||
await sendCipherText(
|
|
||||||
contactId,
|
|
||||||
pb.EncryptedContent(
|
|
||||||
messageUpdate: pb.EncryptedContent_MessageUpdate(
|
|
||||||
type: pb.EncryptedContent_MessageUpdate_Type.OPENED,
|
|
||||||
multipleTargetMessageIds: messageOtherIds,
|
|
||||||
timestamp: Int64(actionAt.millisecondsSinceEpoch),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
blocking: false,
|
|
||||||
);
|
|
||||||
await twonlyDB.batch((batch) {
|
|
||||||
for (final messageId in messageOtherIds) {
|
|
||||||
batch.update(
|
|
||||||
twonlyDB.messages,
|
|
||||||
MessagesCompanion(
|
|
||||||
openedAt: Value(actionAt),
|
|
||||||
openedByAll: Value(actionAt),
|
|
||||||
),
|
|
||||||
where: (tbl) => tbl.messageId.equals(messageId),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
await updateLastMessageId(contactId, biggestMessageId);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> sendContactMyProfileData(int contactId) async {
|
|
||||||
List<int>? avatarSvgCompressed;
|
|
||||||
if (userService.currentUser.avatarSvg != null) {
|
|
||||||
avatarSvgCompressed = gzip.encode(
|
|
||||||
utf8.encode(userService.currentUser.avatarSvg!),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
final encryptedContent = pb.EncryptedContent(
|
|
||||||
contactUpdate: pb.EncryptedContent_ContactUpdate(
|
|
||||||
type: pb.EncryptedContent_ContactUpdate_Type.UPDATE,
|
|
||||||
avatarSvgCompressed: avatarSvgCompressed,
|
|
||||||
displayName: userService.currentUser.displayName,
|
|
||||||
username: userService.currentUser.username,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
await sendCipherText(contactId, encryptedContent, blocking: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
String _getEncryptedContentTypes(pb.EncryptedContent content) {
|
|
||||||
final ignoredFields = {
|
|
||||||
'groupId',
|
|
||||||
'isDirectChat',
|
|
||||||
'senderProfileCounter',
|
|
||||||
'senderUserDiscoveryVersion',
|
|
||||||
};
|
|
||||||
|
|
||||||
final types = <String>[];
|
|
||||||
for (final field in content.info_.byName.values) {
|
|
||||||
if (content.hasField(field.tagNumber) &&
|
|
||||||
!ignoredFields.contains(field.name)) {
|
|
||||||
types.add(field.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return types.join(', ');
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -65,18 +65,23 @@ Future<void> syncFlameCounters({String? forceForGroup}) async {
|
||||||
({int counter, bool isExpiring}) getFlameCounterFromGroup(Group? group) {
|
({int counter, bool isExpiring}) getFlameCounterFromGroup(Group? group) {
|
||||||
const zero = (counter: 0, isExpiring: false);
|
const zero = (counter: 0, isExpiring: false);
|
||||||
if (group == null) return zero;
|
if (group == null) return zero;
|
||||||
if (group.lastMessageSend == null || group.lastMessageReceived == null || group.lastFlameCounterChange == null) {
|
if (group.lastMessageSend == null ||
|
||||||
|
group.lastMessageReceived == null ||
|
||||||
|
group.lastFlameCounterChange == null) {
|
||||||
return zero;
|
return zero;
|
||||||
}
|
}
|
||||||
final now = clock.now();
|
final now = clock.now();
|
||||||
final startOfToday = DateTime(now.year, now.month, now.day);
|
final startOfToday = DateTime(now.year, now.month, now.day);
|
||||||
final twoDaysAgo = startOfToday.subtract(const Duration(days: 2));
|
final twoDaysAgo = startOfToday.subtract(const Duration(days: 2));
|
||||||
final oneDayAgo = startOfToday.subtract(const Duration(days: 1));
|
final oneDayAgo = startOfToday.subtract(const Duration(days: 1));
|
||||||
if (group.lastMessageSend!.isAfter(twoDaysAgo) && group.lastMessageReceived!.isAfter(twoDaysAgo) ||
|
if (group.lastMessageSend!.isAfter(twoDaysAgo) &&
|
||||||
|
group.lastMessageReceived!.isAfter(twoDaysAgo) ||
|
||||||
group.lastFlameCounterChange!.isAfter(oneDayAgo)) {
|
group.lastFlameCounterChange!.isAfter(oneDayAgo)) {
|
||||||
// Flame is expiring when today no exchange has happened yet:
|
// Flame is expiring when today no exchange has happened yet:
|
||||||
// both lastMessageSend and lastMessageReceived are before startOfToday.
|
// both lastMessageSend and lastMessageReceived are before startOfToday.
|
||||||
final isExpiring = group.lastMessageSend!.isBefore(oneDayAgo) || group.lastMessageReceived!.isBefore(oneDayAgo);
|
final isExpiring =
|
||||||
|
group.lastMessageSend!.isBefore(oneDayAgo) ||
|
||||||
|
group.lastMessageReceived!.isBefore(oneDayAgo);
|
||||||
return (counter: group.flameCounter, isExpiring: isExpiring);
|
return (counter: group.flameCounter, isExpiring: isExpiring);
|
||||||
} else {
|
} else {
|
||||||
return zero;
|
return zero;
|
||||||
|
|
@ -117,7 +122,8 @@ Future<void> incFlameCounter(
|
||||||
final now = clock.now();
|
final now = clock.now();
|
||||||
final startOfToday = DateTime(now.year, now.month, now.day);
|
final startOfToday = DateTime(now.year, now.month, now.day);
|
||||||
final twoDaysAgo = startOfToday.subtract(const Duration(days: 2));
|
final twoDaysAgo = startOfToday.subtract(const Duration(days: 2));
|
||||||
if (group.lastMessageSend!.isBefore(twoDaysAgo) || group.lastMessageReceived!.isBefore(twoDaysAgo)) {
|
if (group.lastMessageSend!.isBefore(twoDaysAgo) ||
|
||||||
|
group.lastMessageReceived!.isBefore(twoDaysAgo)) {
|
||||||
flameCounter = 0;
|
flameCounter = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -129,21 +135,25 @@ Future<void> incFlameCounter(
|
||||||
final now = clock.now();
|
final now = clock.now();
|
||||||
final startOfToday = DateTime(now.year, now.month, now.day);
|
final startOfToday = DateTime(now.year, now.month, now.day);
|
||||||
|
|
||||||
if (group.lastFlameCounterChange == null || group.lastFlameCounterChange!.isBefore(startOfToday)) {
|
if (group.lastFlameCounterChange == null ||
|
||||||
|
group.lastFlameCounterChange!.isBefore(startOfToday)) {
|
||||||
// last flame update was yesterday. check if it can be updated.
|
// last flame update was yesterday. check if it can be updated.
|
||||||
var updateFlame = false;
|
var updateFlame = false;
|
||||||
if (received) {
|
if (received) {
|
||||||
if (group.lastMessageSend != null && group.lastMessageSend!.isAfter(startOfToday)) {
|
if (group.lastMessageSend != null &&
|
||||||
|
group.lastMessageSend!.isAfter(startOfToday)) {
|
||||||
// today a message was already send -> update flame
|
// today a message was already send -> update flame
|
||||||
updateFlame = true;
|
updateFlame = true;
|
||||||
}
|
}
|
||||||
} else if (group.lastMessageReceived != null && group.lastMessageReceived!.isAfter(startOfToday)) {
|
} else if (group.lastMessageReceived != null &&
|
||||||
|
group.lastMessageReceived!.isAfter(startOfToday)) {
|
||||||
// today a message was already received -> update flame
|
// today a message was already received -> update flame
|
||||||
updateFlame = true;
|
updateFlame = true;
|
||||||
}
|
}
|
||||||
if (updateFlame) {
|
if (updateFlame) {
|
||||||
flameCounter += 1;
|
flameCounter += 1;
|
||||||
if (group.lastFlameCounterChange == null || group.lastFlameCounterChange!.isBefore(timestamp)) {
|
if (group.lastFlameCounterChange == null ||
|
||||||
|
group.lastFlameCounterChange!.isBefore(timestamp)) {
|
||||||
// only update if the timestamp is newer
|
// only update if the timestamp is newer
|
||||||
lastFlameCounterChange = Value(timestamp);
|
lastFlameCounterChange = Value(timestamp);
|
||||||
}
|
}
|
||||||
|
|
@ -160,11 +170,13 @@ Future<void> incFlameCounter(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (received) {
|
if (received) {
|
||||||
if (group.lastMessageReceived == null || group.lastMessageReceived!.isBefore(timestamp)) {
|
if (group.lastMessageReceived == null ||
|
||||||
|
group.lastMessageReceived!.isBefore(timestamp)) {
|
||||||
lastMessageReceived = Value(timestamp);
|
lastMessageReceived = Value(timestamp);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (group.lastMessageSend == null || group.lastMessageSend!.isBefore(timestamp)) {
|
if (group.lastMessageSend == null ||
|
||||||
|
group.lastMessageSend!.isBefore(timestamp)) {
|
||||||
lastMessageSend = Value(timestamp);
|
lastMessageSend = Value(timestamp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -14,7 +14,9 @@ bool shouldAttemptResync(int userId) {
|
||||||
if (attempt == null) return true;
|
if (attempt == null) return true;
|
||||||
if (attempt.failureCount >= maxResyncAttempts) return false;
|
if (attempt.failureCount >= maxResyncAttempts) return false;
|
||||||
|
|
||||||
final cooldown = Duration(minutes: 5 * pow(5, attempt.failureCount - 1).toInt());
|
final cooldown = Duration(
|
||||||
|
minutes: 5 * pow(5, attempt.failureCount - 1).toInt(),
|
||||||
|
);
|
||||||
return DateTime.now().difference(attempt.lastAttempt) > cooldown;
|
return DateTime.now().difference(attempt.lastAttempt) > cooldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,9 @@ class UserDiscoveryService {
|
||||||
|
|
||||||
static Future<Uint8List?> getCurrentVersion() async {
|
static Future<Uint8List?> getCurrentVersion() async {
|
||||||
try {
|
try {
|
||||||
return await FlutterUserDiscovery.getCurrentVersion(callbackId: isolateCallbackId)
|
return await FlutterUserDiscovery.getCurrentVersion(
|
||||||
.timeout(const Duration(seconds: 5));
|
callbackId: isolateCallbackId,
|
||||||
|
).timeout(const Duration(seconds: 5));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Log.error(e);
|
Log.error(e);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,9 @@ class KeyValueStore {
|
||||||
try {
|
try {
|
||||||
if (file.existsSync()) {
|
if (file.existsSync()) {
|
||||||
final contents = await file.readAsString();
|
final contents = await file.readAsString();
|
||||||
val = factory.fromJson(jsonDecode(contents) as Map<String, dynamic>) as T;
|
val =
|
||||||
|
factory.fromJson(jsonDecode(contents) as Map<String, dynamic>)
|
||||||
|
as T;
|
||||||
} else {
|
} else {
|
||||||
val = factory.defaultValue() as T;
|
val = factory.defaultValue() as T;
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +140,8 @@ class KeyValueStore {
|
||||||
try {
|
try {
|
||||||
if (file.existsSync()) {
|
if (file.existsSync()) {
|
||||||
final contents = await file.readAsString();
|
final contents = await file.readAsString();
|
||||||
return factory.fromJson(jsonDecode(contents) as Map<String, dynamic>) as T;
|
return factory.fromJson(jsonDecode(contents) as Map<String, dynamic>)
|
||||||
|
as T;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Log.warn('Error reading file. Returning default.: $e');
|
Log.warn('Error reading file. Returning default.: $e');
|
||||||
|
|
@ -157,7 +160,8 @@ class KeyValueStore {
|
||||||
try {
|
try {
|
||||||
if (file.existsSync()) {
|
if (file.existsSync()) {
|
||||||
final contents = await file.readAsString();
|
final contents = await file.readAsString();
|
||||||
return factory.fromJson(jsonDecode(contents) as Map<String, dynamic>) as T;
|
return factory.fromJson(jsonDecode(contents) as Map<String, dynamic>)
|
||||||
|
as T;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Log.warn('Error reading file.: $e');
|
Log.warn('Error reading file.: $e');
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,9 @@ class ContactRequestBadgeComp extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
child: NotificationBadgeComp(
|
child: NotificationBadgeComp(
|
||||||
backgroundColor: isDarkMode(context) ? Colors.white : Colors.black,
|
backgroundColor: isDarkMode(context)
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black,
|
||||||
textColor: isDarkMode(context) ? Colors.black : Colors.white,
|
textColor: isDarkMode(context) ? Colors.black : Colors.white,
|
||||||
count: count.toString(),
|
count: count.toString(),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ class CustomColorPickerDialog extends StatefulWidget {
|
||||||
final Color initialColor;
|
final Color initialColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CustomColorPickerDialog> createState() => _CustomColorPickerDialogState();
|
State<CustomColorPickerDialog> createState() =>
|
||||||
|
_CustomColorPickerDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
||||||
|
|
@ -54,7 +55,10 @@ class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
// Hue Slider
|
// Hue Slider
|
||||||
Text(context.lang.hue, style: const TextStyle(fontWeight: FontWeight.w600)),
|
Text(
|
||||||
|
context.lang.hue,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
Slider(
|
Slider(
|
||||||
value: _hsvColor.hue,
|
value: _hsvColor.hue,
|
||||||
max: 360,
|
max: 360,
|
||||||
|
|
@ -66,7 +70,10 @@ class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// Saturation Slider
|
// Saturation Slider
|
||||||
Text(context.lang.saturation, style: const TextStyle(fontWeight: FontWeight.w600)),
|
Text(
|
||||||
|
context.lang.saturation,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
Slider(
|
Slider(
|
||||||
value: _hsvColor.saturation,
|
value: _hsvColor.saturation,
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
|
|
@ -76,7 +83,10 @@ class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// Brightness / Value Slider
|
// Brightness / Value Slider
|
||||||
Text(context.lang.brightness, style: const TextStyle(fontWeight: FontWeight.w600)),
|
Text(
|
||||||
|
context.lang.brightness,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
Slider(
|
Slider(
|
||||||
value: _hsvColor.value,
|
value: _hsvColor.value,
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
|
|
@ -102,7 +112,8 @@ class _CustomColorPickerDialogState extends State<CustomColorPickerDialog> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: MyButton(
|
child: MyButton(
|
||||||
variant: MyButtonVariant.primaryMiddle,
|
variant: MyButtonVariant.primaryMiddle,
|
||||||
onPressed: () => Navigator.of(context).pop(currentColor.toARGB32()),
|
onPressed: () =>
|
||||||
|
Navigator.of(context).pop(currentColor.toARGB32()),
|
||||||
child: Text(context.lang.ok),
|
child: Text(context.lang.ok),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _pickCustomColor({required bool isBgColor}) async {
|
Future<void> _pickCustomColor({required bool isBgColor}) async {
|
||||||
final initial = isBgColor ? Color(_selectedBgColor) : Color(_selectedTextColor);
|
final initial = isBgColor
|
||||||
|
? Color(_selectedBgColor)
|
||||||
|
: Color(_selectedTextColor);
|
||||||
final pickedColorInt = await showDialog<int>(
|
final pickedColorInt = await showDialog<int>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => CustomColorPickerDialog(initialColor: initial),
|
builder: (context) => CustomColorPickerDialog(initialColor: initial),
|
||||||
|
|
@ -109,20 +111,29 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
Text(
|
Text(
|
||||||
isEditing ? context.lang.editLabel : context.lang.createLabel,
|
isEditing ? context.lang.editLabel : context.lang.createLabel,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
// Interactive Inline Label Badge
|
// Interactive Inline Label Badge
|
||||||
Center(
|
Center(
|
||||||
child: IntrinsicWidth(
|
child: IntrinsicWidth(
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: const BoxConstraints(minWidth: 100, maxWidth: 200),
|
constraints: const BoxConstraints(
|
||||||
|
minWidth: 100,
|
||||||
|
maxWidth: 200,
|
||||||
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(_selectedBgColor),
|
color: Color(_selectedBgColor),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 2,
|
||||||
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _nameController,
|
controller: _nameController,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
|
@ -137,13 +148,18 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: context.lang.labelNameHint,
|
hintText: context.lang.labelNameHint,
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Color(_selectedTextColor).withValues(alpha: 0.6),
|
color: Color(
|
||||||
|
_selectedTextColor,
|
||||||
|
).withValues(alpha: 0.6),
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
isDense: true,
|
isDense: true,
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 6),
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 4,
|
||||||
|
vertical: 6,
|
||||||
|
),
|
||||||
counterText: '',
|
counterText: '',
|
||||||
),
|
),
|
||||||
onChanged: (_) => setState(() {}),
|
onChanged: (_) => setState(() {}),
|
||||||
|
|
@ -157,7 +173,10 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
Text(
|
Text(
|
||||||
context.lang.labelBackgroundColor,
|
context.lang.labelBackgroundColor,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(fontSize: 13, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Wrap(
|
Wrap(
|
||||||
|
|
@ -184,7 +203,8 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.check,
|
Icons.check,
|
||||||
size: 18,
|
size: 18,
|
||||||
color: Color(colorValue).computeLuminance() > 0.5
|
color:
|
||||||
|
Color(colorValue).computeLuminance() > 0.5
|
||||||
? Colors.black
|
? Colors.black
|
||||||
: Colors.white,
|
: Colors.white,
|
||||||
)
|
)
|
||||||
|
|
@ -226,7 +246,10 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
Text(
|
Text(
|
||||||
context.lang.labelTextColor,
|
context.lang.labelTextColor,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(fontSize: 13, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Wrap(
|
Wrap(
|
||||||
|
|
@ -253,7 +276,8 @@ class _LabelEditorBottomSheetState extends State<LabelEditorBottomSheet> {
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.check,
|
Icons.check,
|
||||||
size: 18,
|
size: 18,
|
||||||
color: Color(colorValue).computeLuminance() > 0.5
|
color:
|
||||||
|
Color(colorValue).computeLuminance() > 0.5
|
||||||
? Colors.black
|
? Colors.black
|
||||||
: Colors.white,
|
: Colors.white,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,9 @@ class ProfileQrCodeComp extends StatefulWidget {
|
||||||
StreamSubscription<void>? subscription;
|
StreamSubscription<void>? subscription;
|
||||||
|
|
||||||
if (openToVerify) {
|
if (openToVerify) {
|
||||||
subscription = KeyVerificationService.onVerificationSuccessClose.listen((_) {
|
subscription = KeyVerificationService.onVerificationSuccessClose.listen((
|
||||||
|
_,
|
||||||
|
) {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
KeyVerificationService.closeVerificationFlows(context);
|
KeyVerificationService.closeVerificationFlows(context);
|
||||||
}
|
}
|
||||||
|
|
@ -65,15 +67,15 @@ class ProfileQrCodeComp extends StatefulWidget {
|
||||||
Text(
|
Text(
|
||||||
openToVerify
|
openToVerify
|
||||||
? (contact != null
|
? (contact != null
|
||||||
? context.lang.letUserScanQrCode(
|
? context.lang.letUserScanQrCode(
|
||||||
getContactDisplayName(contact),
|
getContactDisplayName(contact),
|
||||||
)
|
)
|
||||||
: context.lang.letFriendScanQrToVerify)
|
: context.lang.letFriendScanQrToVerify)
|
||||||
: (contact != null
|
: (contact != null
|
||||||
? context.lang.letUserScanQrCode(
|
? context.lang.letUserScanQrCode(
|
||||||
getContactDisplayName(contact),
|
getContactDisplayName(contact),
|
||||||
)
|
)
|
||||||
: context.lang.addContactQrSheetSubtext),
|
: context.lang.addContactQrSheetSubtext),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: context.color.onSurface.withValues(alpha: 0.6),
|
color: context.color.onSurface.withValues(alpha: 0.6),
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ class GroupContextMenu extends StatelessWidget {
|
||||||
),
|
),
|
||||||
ContextMenuItem(
|
ContextMenuItem(
|
||||||
title: context.lang.contextMenuOpenChat,
|
title: context.lang.contextMenuOpenChat,
|
||||||
onTap: () => navigator.context.push(Routes.chatsMessages(group.groupId)),
|
onTap: () =>
|
||||||
|
navigator.context.push(Routes.chatsMessages(group.groupId)),
|
||||||
icon: FontAwesomeIcons.comments,
|
icon: FontAwesomeIcons.comments,
|
||||||
),
|
),
|
||||||
if (!group.archived)
|
if (!group.archived)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ class UserContextMenu extends StatelessWidget {
|
||||||
items: [
|
items: [
|
||||||
ContextMenuItem(
|
ContextMenuItem(
|
||||||
title: context.lang.contextMenuUserProfile,
|
title: context.lang.contextMenuUserProfile,
|
||||||
onTap: () => navigator.context.push(Routes.profileContact(contact.userId)),
|
onTap: () =>
|
||||||
|
navigator.context.push(Routes.profileContact(contact.userId)),
|
||||||
icon: FontAwesomeIcons.user,
|
icon: FontAwesomeIcons.user,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -35,16 +35,16 @@ class BetterListTile extends StatelessWidget {
|
||||||
child: (leading != null)
|
child: (leading != null)
|
||||||
? leading
|
? leading
|
||||||
: (icon is IconData)
|
: (icon is IconData)
|
||||||
? Icon(
|
? Icon(
|
||||||
icon as IconData,
|
icon as IconData,
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
color: color,
|
color: color,
|
||||||
)
|
)
|
||||||
: FaIcon(
|
: FaIcon(
|
||||||
icon as FaIconData?,
|
icon as FaIconData?,
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailing: trailing,
|
trailing: trailing,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ class MyIconButton extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyIconButtonState extends State<MyIconButton> {
|
class _MyIconButtonState extends State<MyIconButton> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isEnabled = widget.onPressed != null || widget.onLongPress != null;
|
final isEnabled = widget.onPressed != null || widget.onLongPress != null;
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,15 @@ class _ReactiveTapFeedbackState extends State<ReactiveTapFeedback>
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_controller = AnimationController(
|
_controller =
|
||||||
vsync: this,
|
AnimationController(
|
||||||
lowerBound: double.negativeInfinity,
|
vsync: this,
|
||||||
upperBound: double.infinity,
|
lowerBound: double.negativeInfinity,
|
||||||
value: 0,
|
upperBound: double.infinity,
|
||||||
)..addListener(() {
|
value: 0,
|
||||||
setState(() {});
|
)..addListener(() {
|
||||||
});
|
setState(() {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ class PermissionHandlerViewState extends State<PermissionHandlerView>
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(PermissionHandlerView oldWidget) {
|
void didUpdateWidget(PermissionHandlerView oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (widget.triggerPermissionRequest && !oldWidget.triggerPermissionRequest) {
|
if (widget.triggerPermissionRequest &&
|
||||||
|
!oldWidget.triggerPermissionRequest) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
await _requestPermissions();
|
await _requestPermissions();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,14 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
wideCameraIndex = index;
|
wideCameraIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
final isFront = controller.description.lensDirection == CameraLensDirection.front;
|
final isFront =
|
||||||
|
controller.description.lensDirection == CameraLensDirection.front;
|
||||||
|
|
||||||
final showWideAngleZoomIOS = !showWideAngleZoom && Platform.isIOS && wideCameraIndex != null && !isFront;
|
final showWideAngleZoomIOS =
|
||||||
|
!showWideAngleZoom &&
|
||||||
|
Platform.isIOS &&
|
||||||
|
wideCameraIndex != null &&
|
||||||
|
!isFront;
|
||||||
|
|
||||||
final zoomButtonStyle = TextButton.styleFrom(
|
final zoomButtonStyle = TextButton.styleFrom(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
|
@ -63,11 +68,14 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
|
|
||||||
const zoomTextStyle = TextStyle(fontSize: 13);
|
const zoomTextStyle = TextStyle(fontSize: 13);
|
||||||
final isSmallerFocused =
|
final isSmallerFocused =
|
||||||
scaleFactor < 1 || (showWideAngleZoomIOS && selectedCameraDetails.cameraId == wideCameraIndex);
|
scaleFactor < 1 ||
|
||||||
|
(showWideAngleZoomIOS &&
|
||||||
|
selectedCameraDetails.cameraId == wideCameraIndex);
|
||||||
final isMiddleFocused =
|
final isMiddleFocused =
|
||||||
scaleFactor >= 1 &&
|
scaleFactor >= 1 &&
|
||||||
scaleFactor < 2 &&
|
scaleFactor < 2 &&
|
||||||
!(showWideAngleZoomIOS && selectedCameraDetails.cameraId == wideCameraIndex);
|
!(showWideAngleZoomIOS &&
|
||||||
|
selectedCameraDetails.cameraId == wideCameraIndex);
|
||||||
|
|
||||||
final maxLevel = max(
|
final maxLevel = max(
|
||||||
min(selectedCameraDetails.maxAvailableZoom, 2),
|
min(selectedCameraDetails.maxAvailableZoom, 2),
|
||||||
|
|
@ -117,14 +125,17 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (showWideAngleZoomIOS && selectedCameraDetails.cameraId == wideCameraIndex) {
|
if (showWideAngleZoomIOS &&
|
||||||
|
selectedCameraDetails.cameraId == wideCameraIndex) {
|
||||||
await selectCamera(0, true);
|
await selectCamera(0, true);
|
||||||
} else {
|
} else {
|
||||||
updateScaleFactor(1.0);
|
updateScaleFactor(1.0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
isMiddleFocused ? '${beautifulZoomScale(scaleFactor)}x' : '1.0x',
|
isMiddleFocused
|
||||||
|
? '${beautifulZoomScale(scaleFactor)}x'
|
||||||
|
: '1.0x',
|
||||||
style: zoomTextStyle,
|
style: zoomTextStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -140,7 +151,8 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
2,
|
2,
|
||||||
).toDouble();
|
).toDouble();
|
||||||
|
|
||||||
if (showWideAngleZoomIOS && selectedCameraDetails.cameraId == wideCameraIndex) {
|
if (showWideAngleZoomIOS &&
|
||||||
|
selectedCameraDetails.cameraId == wideCameraIndex) {
|
||||||
await selectCamera(0, true);
|
await selectCamera(0, true);
|
||||||
}
|
}
|
||||||
updateScaleFactor(level);
|
updateScaleFactor(level);
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ class MediaViewerBottomNavigationBar extends StatelessWidget {
|
||||||
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
|
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
|
||||||
)
|
)
|
||||||
: imageSaved
|
: imageSaved
|
||||||
? const Icon(Icons.check)
|
? const Icon(Icons.check)
|
||||||
: const FaIcon(FontAwesomeIcons.floppyDisk, size: 20),
|
: const FaIcon(FontAwesomeIcons.floppyDisk, size: 20),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ import 'package:twonly/src/constants/routes.keys.dart';
|
||||||
import 'package:twonly/src/database/tables/messages.table.dart';
|
import 'package:twonly/src/database/tables/messages.table.dart';
|
||||||
import 'package:twonly/src/database/twonly.db.dart';
|
import 'package:twonly/src/database/twonly.db.dart';
|
||||||
import 'package:twonly/src/model/protobuf/client/generated/data.pb.dart';
|
import 'package:twonly/src/model/protobuf/client/generated/data.pb.dart';
|
||||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart' as pb;
|
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||||
|
as pb;
|
||||||
import 'package:twonly/src/services/api/messages.api.dart';
|
import 'package:twonly/src/services/api/messages.api.dart';
|
||||||
import 'package:twonly/src/services/flame.service.dart';
|
import 'package:twonly/src/services/flame.service.dart';
|
||||||
import 'package:twonly/src/services/subscription.service.dart';
|
import 'package:twonly/src/services/subscription.service.dart';
|
||||||
|
|
@ -60,7 +61,8 @@ class _RestoreFlameCompState extends State<RestoreFlameComp> {
|
||||||
final currentPlan = planFromString(
|
final currentPlan = planFromString(
|
||||||
userService.currentUser.subscriptionPlan,
|
userService.currentUser.subscriptionPlan,
|
||||||
);
|
);
|
||||||
if (!isUserAllowed(currentPlan, PremiumFeatures.RestoreFlames) && kReleaseMode) {
|
if (!isUserAllowed(currentPlan, PremiumFeatures.RestoreFlames) &&
|
||||||
|
kReleaseMode) {
|
||||||
await context.push(Routes.settingsSubscription);
|
await context.push(Routes.settingsSubscription);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ class SelectContactLabelsView extends StatefulWidget {
|
||||||
final int contactId;
|
final int contactId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SelectContactLabelsView> createState() => _SelectContactLabelsViewState();
|
State<SelectContactLabelsView> createState() =>
|
||||||
|
_SelectContactLabelsViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
|
|
@ -35,7 +36,9 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_contactSub = twonlyDB.contactsDao.watchContact(widget.contactId).listen((contact) {
|
_contactSub = twonlyDB.contactsDao.watchContact(widget.contactId).listen((
|
||||||
|
contact,
|
||||||
|
) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_contact = contact;
|
_contact = contact;
|
||||||
|
|
@ -51,13 +54,15 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_contactLabelsSub = twonlyDB.labelsDao.watchContactLabels(widget.contactId).listen((labels) {
|
_contactLabelsSub = twonlyDB.labelsDao
|
||||||
if (mounted) {
|
.watchContactLabels(widget.contactId)
|
||||||
setState(() {
|
.listen((labels) {
|
||||||
_selectedLabelIds = labels.map((l) => l.id).toSet();
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
_selectedLabelIds = labels.map((l) => l.id).toSet();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -88,7 +93,10 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
_selectedLabelIds = newSet;
|
_selectedLabelIds = newSet;
|
||||||
});
|
});
|
||||||
|
|
||||||
await twonlyDB.labelsDao.setContactLabels(widget.contactId, _selectedLabelIds.toList());
|
await twonlyDB.labelsDao.setContactLabels(
|
||||||
|
widget.contactId,
|
||||||
|
_selectedLabelIds.toList(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _createLabel() async {
|
Future<void> _createLabel() async {
|
||||||
|
|
@ -181,7 +189,10 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
getContactDisplayName(contact, maxLength: 25),
|
getContactDisplayName(contact, maxLength: 25),
|
||||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (getContactDisplayName(contact) != contact.username)
|
if (getContactDisplayName(contact) != contact.username)
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -258,7 +269,10 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
vertical: 4,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(label.backgroundColor),
|
color: Color(label.backgroundColor),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
|
@ -284,7 +298,10 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
onTap: () => _editLabel(label),
|
onTap: () => _editLabel(label),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(6),
|
padding: EdgeInsets.all(6),
|
||||||
child: FaIcon(FontAwesomeIcons.penToSquare, size: 16),
|
child: FaIcon(
|
||||||
|
FontAwesomeIcons.penToSquare,
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -296,7 +313,11 @@ class _SelectContactLabelsViewState extends State<SelectContactLabelsView> {
|
||||||
onTap: () => _deleteLabel(label),
|
onTap: () => _deleteLabel(label),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(6),
|
padding: EdgeInsets.all(6),
|
||||||
child: FaIcon(FontAwesomeIcons.trashCan, size: 16, color: Colors.red),
|
child: FaIcon(
|
||||||
|
FontAwesomeIcons.trashCan,
|
||||||
|
size: 16,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,8 @@ class _StartNewChatView extends State<GroupCreateSelectMembersView> {
|
||||||
contact: user,
|
contact: user,
|
||||||
child: ContactLabelsSubtitleBuilder(
|
child: ContactLabelsSubtitleBuilder(
|
||||||
contactId: user.userId,
|
contactId: user.userId,
|
||||||
additionalSubtitle: alreadyInGroup.contains(user.userId)
|
additionalSubtitle:
|
||||||
|
alreadyInGroup.contains(user.userId)
|
||||||
? Text(context.lang.alreadyInGroup)
|
? Text(context.lang.alreadyInGroup)
|
||||||
: null,
|
: null,
|
||||||
builder: (context, subtitleWidget) {
|
builder: (context, subtitleWidget) {
|
||||||
|
|
@ -259,7 +260,9 @@ class _StartNewChatView extends State<GroupCreateSelectMembersView> {
|
||||||
return const BorderSide(width: 0);
|
return const BorderSide(width: 0);
|
||||||
}
|
}
|
||||||
return BorderSide(
|
return BorderSide(
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(
|
||||||
|
context,
|
||||||
|
).colorScheme.outline,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,9 @@ class GroupMemberContextMenu extends StatelessWidget {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!navigator.mounted) return;
|
if (!navigator.mounted) return;
|
||||||
await navigator.context.push(Routes.chatsMessages(directChat.groupId));
|
await navigator.context.push(
|
||||||
|
Routes.chatsMessages(directChat.groupId),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
icon: FontAwesomeIcons.message,
|
icon: FontAwesomeIcons.message,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ class RegisterView extends StatefulWidget {
|
||||||
|
|
||||||
class _RegisterViewState extends State<RegisterView> {
|
class _RegisterViewState extends State<RegisterView> {
|
||||||
final TextEditingController usernameController = TextEditingController();
|
final TextEditingController usernameController = TextEditingController();
|
||||||
final TextEditingController inviteCodeController = TextEditingController();
|
|
||||||
|
|
||||||
bool _registrationDisabled = false;
|
bool _registrationDisabled = false;
|
||||||
bool _isTryingToRegister = false;
|
bool _isTryingToRegister = false;
|
||||||
|
|
@ -65,7 +64,6 @@ class _RegisterViewState extends State<RegisterView> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final username = usernameController.text;
|
final username = usernameController.text;
|
||||||
final inviteCode = inviteCodeController.text;
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_isTryingToRegister = true;
|
_isTryingToRegister = true;
|
||||||
|
|
@ -99,7 +97,7 @@ class _RegisterViewState extends State<RegisterView> {
|
||||||
|
|
||||||
var userId = 0;
|
var userId = 0;
|
||||||
|
|
||||||
final res = await apiService.register(username, inviteCode, proof);
|
final res = await apiService.register(username, null, proof);
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
Log.info('Got user_id ${res.value} from server');
|
Log.info('Got user_id ${res.value} from server');
|
||||||
userId = res.value.userid.toInt() as int;
|
userId = res.value.userid.toInt() as int;
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,10 @@ class MockContactSuggestedActionsComp extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 6),
|
padding: EdgeInsets.symmetric(horizontal: 6),
|
||||||
child: FaIcon(FontAwesomeIcons.circleQuestion, size: 10),
|
child: FaIcon(
|
||||||
|
FontAwesomeIcons.circleQuestion,
|
||||||
|
size: 10,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
context.lang.friendSuggestionsAskFriend,
|
context.lang.friendSuggestionsAskFriend,
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,9 @@ class NextButtonComp extends StatelessWidget {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(
|
||||||
currentPage.isLast ? context.lang.finishSetup : context.lang.next,
|
currentPage.isLast
|
||||||
|
? context.lang.finishSetup
|
||||||
|
: context.lang.next,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ class SafetyProfileCard extends StatelessWidget {
|
||||||
);
|
);
|
||||||
icon = Icons.tune_rounded;
|
icon = Icons.tune_rounded;
|
||||||
badgeText = null;
|
badgeText = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
|
|
@ -70,8 +69,8 @@ class SafetyProfileCard extends StatelessWidget {
|
||||||
color: isSelected
|
color: isSelected
|
||||||
? context.color.primary
|
? context.color.primary
|
||||||
: (isHovered
|
: (isHovered
|
||||||
? context.color.onSurfaceVariant.withValues(alpha: 0.3)
|
? context.color.onSurfaceVariant.withValues(alpha: 0.3)
|
||||||
: context.color.outlineVariant.withValues(alpha: 0.4)),
|
: context.color.outlineVariant.withValues(alpha: 0.4)),
|
||||||
width: isSelected ? 2 : 1,
|
width: isSelected ? 2 : 1,
|
||||||
),
|
),
|
||||||
boxShadow: isSelected
|
boxShadow: isSelected
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,9 @@ class _RecoveryViewState extends State<RecoveryView> {
|
||||||
? const SizedBox(
|
? const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
width: 16,
|
width: 16,
|
||||||
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
|
child: CircularProgressIndicator.adaptive(
|
||||||
|
strokeWidth: 2,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: const Icon(Icons.restore_rounded),
|
: const Icon(Icons.restore_rounded),
|
||||||
style: FilledButton.styleFrom(
|
style: FilledButton.styleFrom(
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,9 @@ class _AppearanceViewState extends State<AppearanceView> {
|
||||||
context: context,
|
context: context,
|
||||||
showDragHandle: true,
|
showDragHandle: true,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final activeColor =
|
final activeColor = context
|
||||||
context.watch<SettingsChangeProvider>().primaryColor;
|
.watch<SettingsChangeProvider>()
|
||||||
|
.primaryColor;
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(24, 8, 24, 32),
|
padding: const EdgeInsets.fromLTRB(24, 8, 24, 32),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -97,15 +98,14 @@ class _AppearanceViewState extends State<AppearanceView> {
|
||||||
Text(
|
Text(
|
||||||
context.lang.settingsAppearancePrimaryColor,
|
context.lang.settingsAppearancePrimaryColor,
|
||||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: presetColors.map((color) {
|
children: presetColors.map((color) {
|
||||||
final isSelected =
|
final isSelected = activeColor.toARGB32() == color.toARGB32();
|
||||||
activeColor.toARGB32() == color.toARGB32();
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await context
|
await context
|
||||||
|
|
@ -126,8 +126,7 @@ class _AppearanceViewState extends State<AppearanceView> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color:
|
color: isSelected ? Colors.white : Colors.transparent,
|
||||||
isSelected ? Colors.white : Colors.transparent,
|
|
||||||
width: 3,
|
width: 3,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import 'package:twonly/src/visual/components/snackbar.dart';
|
||||||
import 'package:twonly/src/visual/elements/my_button.element.dart';
|
import 'package:twonly/src/visual/elements/my_button.element.dart';
|
||||||
|
|
||||||
Future<bool> promptAndDisableMemoriesBackup(BuildContext context) async {
|
Future<bool> promptAndDisableMemoriesBackup(BuildContext context) async {
|
||||||
final cloudOnlyCount =
|
final cloudOnlyCount = await twonlyDB.mediaFilesDao
|
||||||
await twonlyDB.mediaFilesDao.getCloudOnlyMemoriesCount();
|
.getCloudOnlyMemoriesCount();
|
||||||
|
|
||||||
if (!context.mounted) return false;
|
if (!context.mounted) return false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ class BackupPasswordTextField extends StatefulWidget {
|
||||||
final bool obscureByDefault;
|
final bool obscureByDefault;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<BackupPasswordTextField> createState() => _BackupPasswordTextFieldState();
|
State<BackupPasswordTextField> createState() =>
|
||||||
|
_BackupPasswordTextFieldState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BackupPasswordTextFieldState extends State<BackupPasswordTextField> {
|
class _BackupPasswordTextFieldState extends State<BackupPasswordTextField> {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,9 @@ class SecondFactorPicker extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? context.color.primary : Colors.transparent,
|
color: isSelected
|
||||||
|
? context.color.primary
|
||||||
|
: Colors.transparent,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ class PasswordLessRecoveryStatus extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
context.lang.passwordlessRecoveryStatusEnabled(trustedFriendsCount),
|
context.lang.passwordlessRecoveryStatusEnabled(
|
||||||
|
trustedFriendsCount,
|
||||||
|
),
|
||||||
style: Theme.of(context).textTheme.bodyMedium
|
style: Theme.of(context).textTheme.bodyMedium
|
||||||
?.copyWith(
|
?.copyWith(
|
||||||
color: context.color.onSurfaceVariant,
|
color: context.color.onSurfaceVariant,
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,9 @@ class ThresholdPicker extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSelected ? context.color.primary : Colors.transparent,
|
color: isSelected
|
||||||
|
? context.color.primary
|
||||||
|
: Colors.transparent,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,9 @@ class _HelpAFriendPasswordlessRecoveryViewState
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
context.lang.passwordlessRecoverySelectContactDesc,
|
context
|
||||||
|
.lang
|
||||||
|
.passwordlessRecoverySelectContactDesc,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
height: 1.4,
|
height: 1.4,
|
||||||
|
|
@ -174,7 +176,9 @@ class _HelpAFriendPasswordlessRecoveryViewState
|
||||||
child: filteredContacts.isEmpty
|
child: filteredContacts.isEmpty
|
||||||
? Center(
|
? Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
context.lang.passwordlessRecoveryNoContactsFound,
|
context
|
||||||
|
.lang
|
||||||
|
.passwordlessRecoveryNoContactsFound,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
|
|
@ -208,7 +212,9 @@ class _HelpAFriendPasswordlessRecoveryViewState
|
||||||
subtitle: hasShare
|
subtitle: hasShare
|
||||||
? null
|
? null
|
||||||
: Text(
|
: Text(
|
||||||
context.lang.passwordlessRecoveryCantHelpHim,
|
context
|
||||||
|
.lang
|
||||||
|
.passwordlessRecoveryCantHelpHim,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,8 @@ class _ManageStorageViewState extends State<ManageStorageView> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
context.lang.backupFreeSpaceWithCloud,
|
context.lang.backupFreeSpaceWithCloud,
|
||||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
style: Theme.of(context).textTheme.titleSmall
|
||||||
|
?.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
78
pubspec.lock
78
pubspec.lock
|
|
@ -5,10 +5,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d"
|
sha256: "1b0e6a07425a3e460666e88bf1c949ccc7bb0116ad562ce94a1eca60fe820725"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "93.0.0"
|
version: "103.0.0"
|
||||||
_flutterfire_internals:
|
_flutterfire_internals:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -28,10 +28,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b
|
sha256: "61c04d0c1bfed555c681ea079519933f071a5a026578ff73c4ff0df2d3462e5e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.1"
|
version: "13.3.0"
|
||||||
|
analyzer_buffer:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: analyzer_buffer
|
||||||
|
sha256: "445b77e2054fa3e8c8a8ef1b5e9e6b23bb8028fffd34b5e60eaef315b7750674"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.3"
|
||||||
app_links:
|
app_links:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -129,10 +137,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
sha256: aadd943f4f8cc946882c954c187e6115a84c98c81ad1d9c6cbf0895a8c85da9c
|
sha256: b94f5da9ed3d081fd4ecc426c260998b5f4f4eb2f6d89b7e5472edef0b2b2a1b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.5"
|
version: "4.0.10"
|
||||||
build_cli_annotations:
|
build_cli_annotations:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -161,10 +169,10 @@ packages:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
sha256: "521daf8d189deb79ba474e43a696b41c49fb3987818dbacf3308f1e03673a75e"
|
sha256: be46e59dcfefd6c6c7127df9f1be6c1f89219fee22ae02a923463e0f286ce652
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.13.1"
|
version: "2.15.2"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -268,14 +276,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
code_builder:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: code_builder
|
|
||||||
sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.11.1"
|
|
||||||
collection:
|
collection:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -352,10 +352,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2"
|
sha256: "82ade9fc4273f29ed673e33166944465225b4f7fc5d4aaef48605cc751c18fc1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.7"
|
version: "3.1.13"
|
||||||
dbus:
|
dbus:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -391,18 +391,18 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: drift
|
name: drift
|
||||||
sha256: "055c249d1f91be5a47fe447f88afc24c4ca6f4cd6c5ed66767b4797d48acc2e5"
|
sha256: c21b9af62e78f86837638dda6c33506bd9444ca8a32cad2b99c07369cf9e2462
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.32.1"
|
version: "2.34.1"
|
||||||
drift_dev:
|
drift_dev:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: drift_dev
|
name: drift_dev
|
||||||
sha256: "88a9de3af8571518148a6d8a513b57779fd1e60a026d3ab8a481a878fba01d91"
|
sha256: "735aad3c34215805c66bd518c8812fa4f83b5534b2c13c4092c970c04a7e9983"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.32.1"
|
version: "2.34.5"
|
||||||
drift_flutter:
|
drift_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -857,6 +857,22 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "11.0.0"
|
version: "11.0.0"
|
||||||
|
freezed:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: freezed
|
||||||
|
sha256: "27585a6c2b9ac28ffb7b45d87fd1502332af1eb90e1c9f5eb1acb24c71d26e17"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
freezed_annotation:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: freezed_annotation
|
||||||
|
sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.0"
|
||||||
fuchsia_remote_debug_protocol:
|
fuchsia_remote_debug_protocol:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -1146,10 +1162,10 @@ packages:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: json_serializable
|
name: json_serializable
|
||||||
sha256: fbcf404b03520e6e795f6b9b39badb2b788407dfc0a50cf39158a6ae1ca78925
|
sha256: "2c15e78e1cc6e62aadecf59f81566fd56829713d96a8c4177699e2b2e17f20db"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.13.1"
|
version: "6.13.2"
|
||||||
leak_tracker:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1747,18 +1763,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_gen
|
name: source_gen
|
||||||
sha256: "732792cfd197d2161a65bb029606a46e0a18ff30ef9e141a7a82172b05ea8ecd"
|
sha256: a603f1fb984a7391ae5978d1b92bfaaa08b350dca5c825256f925818f7943bf5
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.2"
|
version: "4.2.4"
|
||||||
source_helper:
|
source_helper:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_helper
|
name: source_helper
|
||||||
sha256: "1d3b229b2934034fb2e691fbb3d53e0f75a4af7b1407f88425ed8f209bcb1b8f"
|
sha256: "5e6f216fdf6376c9f3852381ae037499797a3385377d388b011dac98d303c67c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.11"
|
version: "1.3.13"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1802,10 +1818,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sqlparser
|
name: sqlparser
|
||||||
sha256: ab2b467425f1d4f3acfa5fd11a08226f7d6c26ff102c06be1807e1dff34e050b
|
sha256: "772bb2f6f5bce0631a60f26b57d6e8882e1105c22345b05c163ee6ee5d7ba32d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.44.3"
|
version: "0.45.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -2155,5 +2171,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.3"
|
version: "3.1.3"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.12.0 <4.0.0"
|
dart: ">=3.13.0 <4.0.0"
|
||||||
flutter: ">=3.44.0"
|
flutter: ">=3.44.0"
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,7 @@ dev_dependencies:
|
||||||
integration_test:
|
integration_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
workmanager_platform_interface: any
|
workmanager_platform_interface: any
|
||||||
|
freezed: ^4.0.0
|
||||||
|
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
android: true
|
android: true
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "PRAGMA user_version = 25",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "04bc6d004a70fe1ef001c3fe31f1cd7445eb0eb0a08be9a478cd38f4a1a26bb5"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "PRAGMA defer_foreign_keys = ON",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "065a4f476b0322c400c1756c0cd109bfa0267e3668695ab9169cee567253d92b"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT my_group_private_key IS NOT NULL\n FROM groups\n WHERE group_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "my_group_private_key IS NOT NULL",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer",
|
||||||
|
"origin": "Expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "07d19c693f05b07d6d3c29ff7c77571d8dd6b4618434e36f2d9d97a9178ddb3b"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO messages(\n group_id,\n message_id,\n sender_id,\n type,\n content,\n quotes_message_id,\n created_at,\n ack_by_server\n ) VALUES (?, ?, ?, 'text', ?, ?, ?, CAST(strftime('%s', 'now') AS INTEGER))\n ON CONFLICT(message_id) DO NOTHING\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 6
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "0a000bb74996bb70072c0b0dbb3bd54b690ec20c817a2cb1a29b0ac0fcc884ad"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT content\n FROM messages\n WHERE message_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "content",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "messages",
|
||||||
|
"name": "content"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "0c7011264675a005d09dbe0f690e9475f8b8964a8cbce2b0dd4919bd5953bc08"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE contacts\n SET username = COALESCE(?, username),\n display_name = ?,\n avatar_svg_compressed = ?,\n sender_profile_counter = COALESCE(?, sender_profile_counter)\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 5
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "117582dbddd40553a8a622ed65b24284d8fb91c141ba989e2e3f4846c93d2a4c"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO contacts(user_id, username)\n VALUES(99, 'from old backup')\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "12cfa4cbc893602b97027c6f48c659e1b3d7b0ff8fc6037fbf6a89fbc8051584"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT COUNT(*)\n FROM reactions\n WHERE message_id = 'path-text-message' AND sender_id = ? AND emoji = '👍'\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "COUNT(*)",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer",
|
||||||
|
"origin": "Expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "174e1f8d22842961cc26633c7f715a0c278dcda82838188586821354c306b1e9"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE receipts\n SET mark_for_retry = CAST(strftime('%s', 'now') AS INTEGER),\n retry_count = retry_count + 1,\n ack_by_server_at = NULL\n WHERE receipt_id = ? AND contact_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "1acafcad398cb31491dcee91a005eddd33a03d40afa505b7e0b5f59e2f731a20"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO groups(\n group_id,\n state_encryption_key,\n my_group_private_key,\n group_name,\n joined_group\n ) VALUES (?, ?, ?, ?, 0)\n ON CONFLICT(group_id) DO UPDATE SET\n state_encryption_key = excluded.state_encryption_key,\n my_group_private_key = excluded.my_group_private_key,\n left_group = 0,\n deleted_content = 0\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "1acb6b89980e132de5c016723d87d4aee9b08c0f0df9ad97431f408cae37fb7e"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT EXISTS(SELECT 1 FROM contacts WHERE user_id = ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "EXISTS(SELECT 1 FROM contacts WHERE user_id = ?)",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer",
|
||||||
|
"origin": "Expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "2070ef6adc65d84c9e5b4fd451a0023d518b365156981783a621484eefa89291"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO received_receipts(receipt_id)\n VALUES (?)\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2136bd64733c0268d4da52cf36db8df3533d34a45008bddf61e1090ae1ace885"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE contacts\n SET recovery_contacts_secret_share = ?,\n recovery_contacts_threshold = ?,\n recovery_contacts_last_heartbeat = NULL\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "23bf972a725c666365f5bd324f10c6ffd1460d932a31f3099a697ac5c35b882f"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO contacts(user_id, username)\n VALUES(1, 'current data')\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2484b898369866b8e84d2cdcfb5730d18581563906c91333025699708269181c"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO messages(\n group_id,\n message_id,\n sender_id,\n type,\n media_id,\n additional_message_data,\n quotes_message_id,\n created_at\n ) VALUES (?, ?, ?, 'media', ?, ?, ?, ?)\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "26099393d47834ce775cee6533f42d4cab0069c385c3efe8be764c6eacd8e112"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT username\n FROM contacts\n WHERE user_id = 1\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "username",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "contacts",
|
||||||
|
"name": "username"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "272b5a6defc13fb9fe0cedeab4e3e375eccc0513cf2ae0a7e6f95f817b65b1e6"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO signal_kyber_pre_keys(kyber_pre_key_id, record_bytes)\n VALUES (?, ?)\n ON CONFLICT(kyber_pre_key_id)\n DO UPDATE SET record_bytes = excluded.record_bytes\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "27b030470f79c8fdcd05b10291a9606f04c75c01243c14149a8f7e0e32bb408d"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT recovery_secret_share\n FROM contacts\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "recovery_secret_share",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Blob",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "contacts",
|
||||||
|
"name": "recovery_secret_share"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "2e26c6221d3d2d2d64087fe5c563e1632305e9af03a872635ffe99a822ddd643"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT media_id\n FROM messages\n WHERE message_id = ? AND sender_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "media_id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "messages",
|
||||||
|
"name": "media_id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "2ef49cbb297f02183510fd85882d4b1a117ad3500d9ea6a43d22c461623850c9"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE group_members\n SET last_chat_opened = ?, last_type_indicator = ?\n WHERE group_id = ? AND contact_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "3484d2f40693259f1e6030383a9d537ffee52100fe1cd01b25165c6557ac16f9"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE contacts\n SET recovery_secret_share = ?\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "370baafebd6f09754b0e29cf2b384c07426a989e8b1299414d6f5e7a9cdccadb"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT EXISTS(SELECT 1 FROM groups WHERE group_id = ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "EXISTS(SELECT 1 FROM groups WHERE group_id = ?)",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer",
|
||||||
|
"origin": "Expression"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "37ec1618898a149c969bc80fb54f93d5f354e7a9f380ce3420c8feb6378c9ac3"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO app_metadata(key, value)\n VALUES('schema_version', ?)\n ON CONFLICT(key) DO UPDATE SET value = excluded.value\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "3a31981dfd8f53dd63744ae7c15ee125effcfc116476eeda3fbdfc7eb4c26ec9"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT value\n FROM app_metadata\n WHERE key = 'legacy_import_complete'\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "app_metadata",
|
||||||
|
"name": "value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "400da22eb89f22254b6de1cfcea0b0abaf5e05e73a4c534ee45bc0b950c1e356"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE contacts\n SET recovery_last_heartbeat = CASE\n WHEN ? THEN CAST(strftime('%s', 'now') AS INTEGER)\n ELSE NULL\n END\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "42faf2b3351e83b2313cdac31bb03b45f8106967cbdc6e25cb46d92086811ac3"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT identity_key FROM signal_identities WHERE name = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "identity_key",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Blob",
|
||||||
|
"origin": {
|
||||||
|
"Table": {
|
||||||
|
"table": "signal_identities",
|
||||||
|
"name": "identity_key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "4681180c0b45a7f3941ee9d58966dc6eb8a039744e80facc991c7fa3aa8be029"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE contacts\n SET requested = 0, deleted_by_user = 0\n WHERE user_id = ?\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "49a771af89168b9e3d09e2b0cbe49eb2a51189212e1cdb99fb8211bd614c9558"
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue