|
|
|
|
@ -61,13 +61,14 @@ class ChatApiClient {
|
|
|
|
|
|
|
|
|
|
Future<bool> updateDeviceInfo(String employeeNumber) async {
|
|
|
|
|
final Map<String, dynamic> payload = {
|
|
|
|
|
"apiKey": URLs.chatApiKey,
|
|
|
|
|
"employeeNumber": employeeNumber,
|
|
|
|
|
"deviceToken": FirebaseNotificationManger.token,
|
|
|
|
|
"isHuaweiDevice": (await myPlatform()) == "HUAWEI",
|
|
|
|
|
"platform": await myPlatform(),
|
|
|
|
|
"voIPToken": FirebaseNotificationManger.voipToken,
|
|
|
|
|
};
|
|
|
|
|
final Response response = await ApiClient().postJsonForResponse(URLs.updateDeviceInfo, payload, token: chatLoginResponse!.token);
|
|
|
|
|
final Response response = await ApiClient().postJsonForResponse(URLs.updateDeviceInfo, payload);
|
|
|
|
|
return response.statusCode == 200;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|