✨ Bug fixes in notification and support iOS Communication Notification!
This commit is contained in:
@ -9,7 +9,7 @@ class Notification {
|
||||
String? avatar;
|
||||
String? picture;
|
||||
int? senderId;
|
||||
int recipientId;
|
||||
int accountId;
|
||||
|
||||
Notification({
|
||||
required this.id,
|
||||
@ -22,7 +22,7 @@ class Notification {
|
||||
required this.avatar,
|
||||
required this.picture,
|
||||
required this.senderId,
|
||||
required this.recipientId,
|
||||
required this.accountId,
|
||||
});
|
||||
|
||||
factory Notification.fromJson(Map<String, dynamic> json) => Notification(
|
||||
@ -40,7 +40,7 @@ class Notification {
|
||||
avatar: json['avatar'],
|
||||
picture: json['picture'],
|
||||
senderId: json['sender_id'],
|
||||
recipientId: json['recipient_id'],
|
||||
accountId: json['account_id'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@ -54,6 +54,6 @@ class Notification {
|
||||
'avatar': avatar,
|
||||
'picture': picture,
|
||||
'sender_id': senderId,
|
||||
'recipient_id': recipientId,
|
||||
'account_id': accountId,
|
||||
};
|
||||
}
|
||||
|
@ -127,6 +127,8 @@ class WebSocketProvider extends GetxController {
|
||||
|
||||
if (deviceUuid == null || deviceUuid.isEmpty) {
|
||||
log("Unable to active push notifications, couldn't get device uuid");
|
||||
} else {
|
||||
log('Device UUID is $deviceUuid');
|
||||
}
|
||||
|
||||
if (PlatformInfo.isIOS || PlatformInfo.isMacOS) {
|
||||
@ -136,6 +138,7 @@ class WebSocketProvider extends GetxController {
|
||||
provider = 'firebase';
|
||||
token = await FirebaseMessaging.instance.getToken();
|
||||
}
|
||||
log('Device Push Token is $token');
|
||||
|
||||
final client = auth.configureClient('auth');
|
||||
|
||||
|
Reference in New Issue
Block a user