mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-19 08:13:34 +00:00
16 lines
546 B
Dart
16 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'],
|
|
);
|
|
}
|