markdown support for talk messages
This commit is contained in:
@@ -42,6 +42,11 @@ class GetChatResponseObject {
|
||||
Map<String, RichObjectString>? messageParameters;
|
||||
GetChatResponseObject? parent;
|
||||
|
||||
/// Whether the server flagged this message to be rendered as Markdown
|
||||
/// (capability `markdown-messages`). Absent on older servers/messages, in
|
||||
/// which case it stays `false` and the body renders as plain text.
|
||||
bool markdown;
|
||||
|
||||
GetChatResponseObject(
|
||||
this.id,
|
||||
this.token,
|
||||
@@ -57,8 +62,9 @@ class GetChatResponseObject {
|
||||
this.messageParameters,
|
||||
this.reactions,
|
||||
this.reactionsSelf,
|
||||
this.parent,
|
||||
);
|
||||
this.parent, [
|
||||
this.markdown = false,
|
||||
]);
|
||||
|
||||
factory GetChatResponseObject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GetChatResponseObjectFromJson(json);
|
||||
|
||||
@@ -49,6 +49,7 @@ GetChatResponseObject _$GetChatResponseObjectFromJson(
|
||||
json['parent'] == null
|
||||
? null
|
||||
: GetChatResponseObject.fromJson(json['parent'] as Map<String, dynamic>),
|
||||
json['markdown'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetChatResponseObjectToJson(
|
||||
@@ -73,6 +74,7 @@ Map<String, dynamic> _$GetChatResponseObjectToJson(
|
||||
(k, e) => MapEntry(k, e.toJson()),
|
||||
),
|
||||
'parent': instance.parent?.toJson(),
|
||||
'markdown': instance.markdown,
|
||||
};
|
||||
|
||||
const _$GetRoomResponseObjectMessageActorTypeEnumMap = {
|
||||
|
||||
Reference in New Issue
Block a user