diff --git a/changelog.d/772.bugfix b/changelog.d/772.bugfix new file mode 100644 index 00000000..70cfa305 --- /dev/null +++ b/changelog.d/772.bugfix @@ -0,0 +1 @@ +Fix swallowed text between 2 mentions. diff --git a/src/SlackGhost.ts b/src/SlackGhost.ts index 9fd574e2..acfbce7e 100644 --- a/src/SlackGhost.ts +++ b/src/SlackGhost.ts @@ -314,7 +314,7 @@ export class SlackGhost { public prepareBody(body: string): string { // TODO: This is fixing plaintext mentions, but should be refactored. // See https://github.com/matrix-org/matrix-appservice-slack/issues/110 - return body.replace(//g, "$1"); + return body.replace(/]+)>/g, "$1"); } public prepareFormattedBody(body: string): string {