Skip to content

Conversation

raunakab
Copy link
Contributor

Description

Previous PR left out the processing of replies to a message. This PR adds it back.

Addresses: https://linear.app/danswer/issue/DAN-1997/teams-replies-not-being-parsed-and-processed-in-document.

How Has This Been Tested?

Tests were written in the previous PR. For this one, since replies are included, they have been updated to include the replies in the expected output.

@raunakab raunakab requested a review from a team as a code owner May 20, 2025 20:30
Copy link

vercel bot commented May 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:00pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR reintroduces Teams message replies processing, ensuring that replies are properly concatenated with their parent messages into single documents.

  • Modified _collect_document_for_channel_id in backend/onyx/connectors/teams/connector.py to fetch and include message replies in thread documents
  • Updated test expectations in test_teams_connector.py to verify concatenated message-reply combinations (e.g., "This is the first message...This is a reply!This is a second reply")
  • Renamed _filter_message to _should_process_message for better function naming clarity
  • Added proper timestamp validation to ensure messages and replies are within the specified time range

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@raunakab raunakab requested review from Weves and evan-onyx May 20, 2025 20:31
@raunakab raunakab enabled auto-merge May 20, 2025 21:04
@raunakab raunakab requested a review from evan-onyx May 20, 2025 21:49
@raunakab raunakab force-pushed the fix/teams-replies branch from 66ab34c to 70f00cb Compare May 20, 2025 21:50
@raunakab raunakab added this pull request to the merge queue May 20, 2025
Merged via the queue into main with commit 95dabfa May 21, 2025
10 of 11 checks passed
@raunakab raunakab deleted the fix/teams-replies branch May 21, 2025 00:00
ferdinandl007 pushed a commit to ferdinandl007/onyx that referenced this pull request May 27, 2025
* Add replies to document construction and edit tests

* Update tests

* Add replies processing to teams

* Fix test

* Add try-except block around potential failure

* Update entity-id during ConnectorFailure raise
aronszanto pushed a commit to aronszanto/onyx that referenced this pull request May 27, 2025
* Add replies to document construction and edit tests

* Update tests

* Add replies processing to teams

* Fix test

* Add try-except block around potential failure

* Update entity-id during ConnectorFailure raise
ZhipengHe pushed a commit to ZhipengHe/onyx that referenced this pull request Jun 6, 2025
* Add replies to document construction and edit tests

* Update tests

* Add replies processing to teams

* Fix test

* Add try-except block around potential failure

* Update entity-id during ConnectorFailure raise
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Add replies to document construction and edit tests

* Update tests

* Add replies processing to teams

* Fix test

* Add try-except block around potential failure

* Update entity-id during ConnectorFailure raise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants