mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-19 09:23:31 +00:00
17 lines
546 B
Dart
17 lines
546 B
Dart
|
import '../../models/user_notification.dart';
|
||
|
|
||
|
extension NotificationFriendicaExtension on UserNotification {
|
||
|
static UserNotification fromJson(Map<String, dynamic> json) =>
|
||
|
UserNotification(
|
||
|
id: json['id'].toString(),
|
||
|
type: json['type'].toString(),
|
||
|
fromName: json['name'],
|
||
|
fromUrl: json['url'],
|
||
|
timestamp: int.tryParse(json['timestamp'] ?? '') ?? 0,
|
||
|
iid: json['iid'].toString(),
|
||
|
seen: json['seen'] ?? false,
|
||
|
content: json['msg_html'],
|
||
|
link: json['link'],
|
||
|
);
|
||
|
}
|