Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle bot not in requested room #2

Closed
moan0s opened this issue Oct 4, 2022 · 0 comments
Closed

Handle bot not in requested room #2

moan0s opened this issue Oct 4, 2022 · 0 comments

Comments

@moan0s
Copy link
Owner

moan0s commented Oct 4, 2022

Oct 04 16:04:40 X-Wing matrix-nginx-proxy[1339632]: 172.18.0.1 - - [04/Oct/2022:16:04:40 +0000] "GET /_matrix/client/v3/rooms/%21ujxjgvoAxxHVXSdlev%3Aactiv
ism.international/state/m.room.encryption/ HTTP/1.1" 403 158 "-" "Python/3.9 aiohttp/3.8.1" "-"                                                            
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]: [2022-10-04 16:04:40,985] [ERROR@aiohttp.server] Error handling request                                 
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]: Traceback (most recent call last):                                                                      
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request         
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     resp = await request_handler(request)                                                               
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle                      Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     resp = await handler(request)                                                                       Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl                 
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     return await handler(request)                                                                       Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/opt/maubot/maubot/server.py", line 119, in frontend_404_middleware                             
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     return await handler(request)                                                                       Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/opt/maubot/maubot/server.py", line 69, in handle_plugin_path                                   
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     return await app.handle(request)                                                                    Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/opt/maubot/maubot/plugin_server.py", line 57, in handle                                        
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     resp = await handler(request)                                                                       Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/data/plugins/de.hyteck.alertbot-v1.0.0.mbp/alertbot.py", line 177, in webhook_room             Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     await self.send_alert(req, room=room_id)                                                            
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/data/plugins/de.hyteck.alertbot-v1.0.0.mbp/alertbot.py", line 172, in send_alert               Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     await self.client.send_markdown(room, message)                                                      Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/opt/maubot/maubot/matrix.py", line 166, in send_markdown                                       
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     return await self.send_message(room_id, content, **kwargs)                                          Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/mautrix/client/encryption_manager.py", line 157, in send_messag
e_event                                                                                                                                                    Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     await self.get_state_event(room_id, EventType.ROOM_ENCRYPTION)                                      
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/mautrix/client/store_updater.py", line 162, in get_state_event Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     event = await super().get_state_event(room_id, event_type, state_key)                               Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/mautrix/client/api/events.py", line 149, in get_state_event    
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     content = await self.api.request(                                                                   Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/mautrix/api.py", line 383, in request                          Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     return await self._send(method, full_url, req_content, query_params, headers or {})                 
Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:   File "/usr/lib/python3.9/site-packages/mautrix/api.py", line 258, in _send                            Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]:     raise make_request_error(                                                                           Oct 04 16:04:40 X-Wing matrix-bot-maubot[1341237]: mautrix.errors.request.MForbidden: User @alertbot:hyteck.de not in room !ujxjgvoAxxHVXSdlev:activism.int
ernational, and room previews are disabled    
@moan0s moan0s closed this as completed in 71d27f5 Dec 14, 2022
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

No branches or pull requests

1 participant