web&server: show raw body contents of UnhandledContentType
This commit is contained in:
@@ -1505,6 +1505,22 @@
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"deprecationReason": null,
|
||||
"description": null,
|
||||
"isDeprecated": false,
|
||||
"name": "contentTree",
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"inputFields": null,
|
||||
|
||||
@@ -23,6 +23,7 @@ query ShowThreadQuery($threadId: String!) {
|
||||
__typename
|
||||
... on UnhandledContentType {
|
||||
contents
|
||||
contentTree
|
||||
}
|
||||
... on PlainText {
|
||||
contents
|
||||
|
||||
@@ -691,8 +691,13 @@ fn message_render(msg: &ShowThreadQueryThreadMessages, open: bool) -> Node<Msg>
|
||||
C!["body"],
|
||||
match &msg.body {
|
||||
ShowThreadQueryThreadMessagesBody::UnhandledContentType(
|
||||
ShowThreadQueryThreadMessagesBodyOnUnhandledContentType { contents },
|
||||
) => pre![C!["error"], contents],
|
||||
ShowThreadQueryThreadMessagesBodyOnUnhandledContentType { contents ,content_tree},
|
||||
) => div![
|
||||
raw_text_message(&contents),
|
||||
div![C!["error"],
|
||||
view_content_tree(&content_tree),
|
||||
]
|
||||
],
|
||||
ShowThreadQueryThreadMessagesBody::PlainText(
|
||||
ShowThreadQueryThreadMessagesBodyOnPlainText {
|
||||
contents,
|
||||
|
||||
Reference in New Issue
Block a user