Skip to content

Conversation

@kyteinsky
Copy link
Contributor

Changes proposed in this pull request:

  • handle bot join messages properly to get conversation id and name

bot join message:

{'type': 'Join', 'actor': {'type': 'Application', 'id': 'bots/bot-8fbab44b3648e53e2252d262ab600532a4232ee8', 'name': 'SummaryBot'}, 'object': {'type': 'Collection', 'id': 'x8w9eukg', 'name': 'summary test'}, '_route': 'ocs.app_api.talkbot.proxytalkmessage', 'appId': 'summary_bot', 'route': 'summary_bot'}

user join message:

{'type': 'Activity', 'actor': {'type': 'Person', 'id': 'users/bob', 'name': 'bob'}, 'object': {'type': 'Note', 'id': '401', 'name': 'user_added', 'content': '{"message":"{actor} joined the conversation","parameters":{"actor":{"type":"user","id":"bob","name":"bob","mention-id":"bob"},"user":{"type":"user","id":"bob","name":"bob","mention-id":"bob"}}}', 'mediaType': 'text/markdown'}, 'target': {'type': 'Collection', 'id': 'x8w9eukg', 'name': 'summary test'}, '_route': 'ocs.app_api.talkbot.proxytalkmessage', 'appId': 'summary_bot', 'route': 'summary_bot'}

Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.72%. Comparing base (7a374e5) to head (aae9390).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
nc_py_api/talk_bot.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
- Coverage   94.79%   94.72%   -0.08%     
==========================================
  Files          45       45              
  Lines        5381     5385       +4     
==========================================
  Hits         5101     5101              
- Misses        280      284       +4     
Files with missing lines Coverage Δ
nc_py_api/talk_bot.py 61.87% <0.00%> (-1.59%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bigcat88
Copy link
Member

bigcat88 commented Nov 25, 2025

Will it be better to check if the target is missing then to fallback to object?

edited: but the way it's done now is also fine

@kyteinsky
Copy link
Contributor Author

yeah I thought about it but I'm not quite sure what all kinds of messages are received and if that broad approach made sense.

but the way it's done now is also fine

same for me with the fallback approach, either works.

Copy link
Member

@oleksandr-nc oleksandr-nc left a comment

Choose a reason for hiding this comment

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

tu publish a new version, just made a separate commit(no need to create tag) to the main branch with [publish] text in the commit.

see as example: v0.22.0 [publish]

@kyteinsky
Copy link
Contributor Author

kyteinsky commented Nov 25, 2025

thanks!
A changelog entry is required, or?
like this one: 48c9113

@kyteinsky kyteinsky merged commit 9846510 into main Nov 25, 2025
13 checks passed
@kyteinsky kyteinsky deleted the fix/talk-bot/bot-join-msg branch November 25, 2025 07:44
@bigcat88
Copy link
Member

better to release versions with changelog :)

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