Skip to content

Instantly share code, notes, and snippets.

@wictorwilen
Created June 5, 2017 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wictorwilen/594bdcdc196a84a60f3a0b6025205935 to your computer and use it in GitHub Desktop.
Save wictorwilen/594bdcdc196a84a60f3a0b6025205935 to your computer and use it in GitHub Desktop.
Scrub @ mentions in Microsoft Teams
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