Rich message rendering #24
|
@ -14,7 +14,6 @@ class MatrixEvent extends ElemJS {
|
|||
// predicates
|
||||
|
||||
canGroup() {
|
||||
|
||||
//return this.data.type === "m.room.message"
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ purifier.addHook("uponSanitizeAttribute", (node, hookevent, config) => {
|
|||
hookevent.keepAttr = allowed_attributes.indexOf(hookevent.attrName) > -1;
|
||||
})
|
||||
|
||||
//Remove bad classes from our code element
|
||||
purifier.addHook("uponSanitizeElement", (node, hookevent, config) => {
|
||||
// Remove bad classes from our code element
|
||||
if (node.tagName == "CODE") {
|
||||
node.classList.forEach(c => {
|
||||
if (!c.startsWith("language-")) {
|
||||
|
|
Loading…
Reference in New Issue
The original idea here was that we'd have a predicate for things like whether the method can be displayed as a message group, whether it should show a timestamp, or whatever other things could affect the display based on the class. I haven't actually put this method to any use yet.