mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:28:40 +00:00
send app version
This commit is contained in:
parent
bdc4780d30
commit
c6e8c8fa32
1 changed files with 5 additions and 1 deletions
|
|
@ -1,10 +1,12 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:collection';
|
import 'dart:collection';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'package:fixnum/fixnum.dart';
|
import 'package:fixnum/fixnum.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
import 'package:twonly/src/app.dart';
|
import 'package:twonly/src/app.dart';
|
||||||
import 'package:twonly/src/proto/api/client_to_server.pbserver.dart';
|
import 'package:twonly/src/proto/api/client_to_server.pbserver.dart';
|
||||||
|
|
@ -219,6 +221,7 @@ class ApiProvider {
|
||||||
if (apiAuthToken != null) {
|
if (apiAuthToken != null) {
|
||||||
final authenticate = Handshake_Authenticate()
|
final authenticate = Handshake_Authenticate()
|
||||||
..userId = Int64(userId)
|
..userId = Int64(userId)
|
||||||
|
..appVersion = (await PackageInfo.fromPlatform()).version
|
||||||
..authToken = base64Decode(apiAuthToken);
|
..authToken = base64Decode(apiAuthToken);
|
||||||
|
|
||||||
final handshake = Handshake()..authenticate = authenticate;
|
final handshake = Handshake()..authenticate = authenticate;
|
||||||
|
|
@ -313,7 +316,8 @@ class ApiProvider {
|
||||||
..registrationId = Int64(signalIdentity.registrationId)
|
..registrationId = Int64(signalIdentity.registrationId)
|
||||||
..signedPrekey = signedPreKey.getKeyPair().publicKey.serialize()
|
..signedPrekey = signedPreKey.getKeyPair().publicKey.serialize()
|
||||||
..signedPrekeySignature = signedPreKey.signature
|
..signedPrekeySignature = signedPreKey.signature
|
||||||
..signedPrekeyId = Int64(signedPreKey.id);
|
..signedPrekeyId = Int64(signedPreKey.id)
|
||||||
|
..isIos = Platform.isIOS;
|
||||||
|
|
||||||
if (inviteCode != null && inviteCode != "") {
|
if (inviteCode != null && inviteCode != "") {
|
||||||
register.inviteCode = inviteCode;
|
register.inviteCode = inviteCode;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue