Merge pull request #482 from monich/strikethrough

Support textEntityTypeStrikethrough
This commit is contained in:
Sebastian Wolf 2022-03-21 21:47:33 +01:00 committed by GitHub
commit 8c725826cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -302,6 +302,12 @@ function enhanceMessageText(formattedText, ignoreEntities) {
{ offset: (entity.offset + entity.length), insertionString: "</i>", removeLength: 0 } { offset: (entity.offset + entity.length), insertionString: "</i>", removeLength: 0 }
); );
break; break;
case "textEntityTypeStrikethrough":
messageInsertions.push(
{ offset: entity.offset, insertionString: "<s>", removeLength: 0 },
{ offset: (entity.offset + entity.length), insertionString: "</s>", removeLength: 0 }
);
break;
case "textEntityTypeMention": case "textEntityTypeMention":
messageInsertions.push( messageInsertions.push(
{ offset: entity.offset, insertionString: "<a href=\"user://" + messageText.substring(entity.offset, ( entity.offset + entity.length )) + "\">", removeLength: 0 }, { offset: entity.offset, insertionString: "<a href=\"user://" + messageText.substring(entity.offset, ( entity.offset + entity.length )) + "\">", removeLength: 0 },