Add LLM digest setup and share timestamp context
This commit is contained in:
@@ -38,6 +38,7 @@ class SharedPayload {
|
||||
required this.createdAt,
|
||||
required this.receivedAt,
|
||||
required this.platform,
|
||||
this.sharedMessageDateTime,
|
||||
this.url,
|
||||
this.sourceDisplayName,
|
||||
this.sourceUserId,
|
||||
@@ -53,6 +54,7 @@ class SharedPayload {
|
||||
final String? url;
|
||||
final DateTime createdAt;
|
||||
final DateTime receivedAt;
|
||||
final DateTime? sharedMessageDateTime;
|
||||
final String platform;
|
||||
final String? sourceDisplayName;
|
||||
final String? sourceUserId;
|
||||
@@ -68,6 +70,7 @@ class SharedPayload {
|
||||
String? url,
|
||||
DateTime? createdAt,
|
||||
DateTime? receivedAt,
|
||||
DateTime? sharedMessageDateTime,
|
||||
String? platform,
|
||||
String? sourceDisplayName,
|
||||
String? sourceUserId,
|
||||
@@ -83,6 +86,8 @@ class SharedPayload {
|
||||
url: url ?? this.url,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
receivedAt: receivedAt ?? this.receivedAt,
|
||||
sharedMessageDateTime:
|
||||
sharedMessageDateTime ?? this.sharedMessageDateTime,
|
||||
platform: platform ?? this.platform,
|
||||
sourceDisplayName: sourceDisplayName ?? this.sourceDisplayName,
|
||||
sourceUserId: sourceUserId ?? this.sourceUserId,
|
||||
@@ -101,6 +106,7 @@ class SharedPayload {
|
||||
'url': url,
|
||||
'createdAt': createdAt.toUtc().toIso8601String(),
|
||||
'receivedAt': receivedAt.toUtc().toIso8601String(),
|
||||
'sharedMessageDateTime': sharedMessageDateTime?.toUtc().toIso8601String(),
|
||||
'platform': platform,
|
||||
'sourceDisplayName': sourceDisplayName,
|
||||
'sourceUserId': sourceUserId,
|
||||
@@ -130,6 +136,9 @@ class SharedPayload {
|
||||
json['receivedAt'] as String? ??
|
||||
DateTime.now().toUtc().toIso8601String(),
|
||||
).toLocal(),
|
||||
sharedMessageDateTime: json['sharedMessageDateTime'] == null
|
||||
? null
|
||||
: DateTime.parse(json['sharedMessageDateTime'] as String).toLocal(),
|
||||
platform: json['platform'] as String? ?? 'unknown',
|
||||
sourceDisplayName: json['sourceDisplayName'] as String?,
|
||||
sourceUserId: json['sourceUserId'] as String?,
|
||||
@@ -244,7 +253,8 @@ class SharedMessageEntry {
|
||||
|
||||
String get sourceApp => payload.sourceApp;
|
||||
String get messageText => payload.rawText;
|
||||
DateTime get sharedAt => payload.createdAt;
|
||||
DateTime get sharedAt => payload.sharedMessageDateTime ?? payload.createdAt;
|
||||
DateTime? get sharedMessageDateTime => payload.sharedMessageDateTime;
|
||||
SharedPayloadType get payloadType => payload.payloadType;
|
||||
String? get url => payload.url;
|
||||
String? get sourceDisplayName => payload.sourceDisplayName;
|
||||
|
||||
Reference in New Issue
Block a user