Commit 9846510
authored
fix: handle bot join messages properly to get conversation id and name (#385)
Changes proposed in this pull request:
* handle bot join messages properly to get conversation id and name
bot join message:
```py
{'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:
```py
{'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 <[email protected]>1 parent 7a374e5 commit 9846510
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
0 commit comments