mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
(de)serialize at-room-pills just like pill-candidate (no html needed)
This commit is contained in:
@@ -24,6 +24,7 @@ export function mdSerialize(model) {
|
|||||||
return html + "\n";
|
return html + "\n";
|
||||||
case "plain":
|
case "plain":
|
||||||
case "pill-candidate":
|
case "pill-candidate":
|
||||||
|
case "at-room-pill":
|
||||||
return html + part.text;
|
return html + part.text;
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
@@ -47,6 +48,7 @@ export function textSerialize(model) {
|
|||||||
return text + "\n";
|
return text + "\n";
|
||||||
case "plain":
|
case "plain":
|
||||||
case "pill-candidate":
|
case "pill-candidate":
|
||||||
|
case "at-room-pill":
|
||||||
return text + part.text;
|
return text + part.text;
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
@@ -58,13 +60,11 @@ export function textSerialize(model) {
|
|||||||
export function requiresHtml(model) {
|
export function requiresHtml(model) {
|
||||||
return model.parts.some(part => {
|
return model.parts.some(part => {
|
||||||
switch (part.type) {
|
switch (part.type) {
|
||||||
case "newline":
|
|
||||||
case "plain":
|
|
||||||
case "pill-candidate":
|
|
||||||
return false;
|
|
||||||
case "room-pill":
|
case "room-pill":
|
||||||
case "user-pill":
|
case "user-pill":
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user