Designed talk message reactions
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import '../../../apiResponse.dart';
|
||||
@ -34,6 +35,8 @@ class GetChatResponseObject {
|
||||
bool isReplyable;
|
||||
String referenceId;
|
||||
String message;
|
||||
Map<String, int>? reactions;
|
||||
List<String>? reactionsSelf;
|
||||
@JsonKey(fromJson: _fromJson) Map<String, RichObjectString>? messageParameters;
|
||||
|
||||
GetChatResponseObject(
|
||||
@ -48,11 +51,35 @@ class GetChatResponseObject {
|
||||
this.isReplyable,
|
||||
this.referenceId,
|
||||
this.message,
|
||||
this.messageParameters);
|
||||
this.messageParameters,
|
||||
this.reactions,
|
||||
this.reactionsSelf
|
||||
);
|
||||
|
||||
factory GetChatResponseObject.fromJson(Map<String, dynamic> json) => _$GetChatResponseObjectFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$GetChatResponseObjectToJson(this);
|
||||
|
||||
static GetChatResponseObject getDateDummy(int timestamp) {
|
||||
DateTime elementDate = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
|
||||
|
||||
return GetChatResponseObject(
|
||||
0,
|
||||
"",
|
||||
GetRoomResponseObjectMessageActorType.user,
|
||||
"",
|
||||
"",
|
||||
timestamp,
|
||||
elementDate.toIso8601String(),
|
||||
GetRoomResponseObjectMessageType.system,
|
||||
false,
|
||||
"",
|
||||
Jiffy.parseFromDateTime(elementDate).format(pattern: "dd.MM.yyyy"),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Map<String, RichObjectString>? _fromJson(json) {
|
||||
|
Reference in New Issue
Block a user