Created
June 5, 2017 06:29
-
-
Save wictorwilen/594bdcdc196a84a60f3a0b6025205935 to your computer and use it in GitHub Desktop.
Scrub @ mentions in Microsoft Teams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static extractTextFromMessage(message: builder.IMessage): string { | |
var s = (message.text) ? message.text : ''; | |
if (message.entities) { | |
message.entities.forEach((ent: any) => { | |
s = s.replace(ent.text, ''); | |
}) | |
} | |
return s.trim(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment