rveachkc / pymsteams

Format messages and post to Microsoft Teams.
https://pypi.org/project/pymsteams/
Apache License 2.0
426 stars 79 forks source link

Bug: Search doesn't work with messages sent through pymsteams #31

Closed shreyashk2006 closed 5 years ago

shreyashk2006 commented 5 years ago

I'm using pymsteams to send alerts about my system to a channel. Each message contains a unique ID in the message body, which can be used to reference a specific message. The code I use looks like this:

teams_obj = pymsteams.connectorcard(HOOK_URL)
title = 'title'
activity_title = 'activity_title'
activity_subtitle = 'activity_subtitle'
body = 'body'

section = pymsteams.cardsection()
section.title(title)
section.activityTitle(activity_title)
section.activitySubtitle(activity_subtitle)
section.text(body)
teams_obj.addSection(section)
teams_obj.send()

However, I see that the search functionality in Teams does not consider messages posted through pymsteams (like it's not been indexed?). Is this expected behaviour from the Teams API or is this something specific to pymsteams?

rveachkc commented 5 years ago

It looks like this is an issue with the Microsoft service and how it handles connector cards - not an issue introduced by this module.

This is probably the best place to follow this issue: Search for text inside cards posted on incoming webhook