You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
I've found an issue. When I have an action type being interactive_message, the data I receive doesn't contain an action_id, only name, type and selected_options, therefore I receive this error:
INFO: 34.207.162.7:0 - "POST /slack/actions HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 389, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/fastapi/applications.py", line 149, in __call__
await super().__call__(scope, receive, send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/applications.py", line 102, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/routing.py", line 550, in __call__
await route.handle(scope, receive, send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/fastapi/routing.py", line 196, in app
raw_response = await run_endpoint_function(
File "/home/marcelo/anaconda3/envs/coinprice/lib/python3.8/site-packages/fastapi/routing.py", line 148, in run_endpoint_function
return await dependant.call(**values)
File "/home/marcelo/Development/fastapi/slackers/src/slackers/server.py", line 47, in post_actions
triggered_events = [
File "/home/marcelo/Development/fastapi/slackers/src/slackers/server.py", line 48, in<listcomp>
f"{action.type}:{triggered_action['action_id']}"
Can someone help me?
Changing the conditionals on the server.actions solves the problem:
@router.post("/actions",status_code=HTTP_200_OK,dependencies=[Depends(verify_signature), Depends(check_timeout)],)asyncdefpost_actions(request: Request) ->Response:
form=awaitrequest.form()
form_data=json.loads(form["payload"])
# have the convenience of pydantic validationaction=SlackAction(**form_data)
_events= [action.type]
ifaction.callback_id:
_events.append(f"{action.type}:{action.callback_id}")
elifaction.actions:
triggered_events= [
f"{action.type}:{triggered_action['action_id']}"fortriggered_actioninaction.actions
]
_events.extend(triggered_events)
@Kludex Hi, thanks for reporting. I am happy to look into this. If you could wait a couple of days; it's more of a side project for me. This weekend I should have some spare hours, so if you can wait that long I'll see what I can do.
As for maintaining, I am no longer an active user myself - I had a use probable use case, but in the end it didn't come to actually using it. Any errors I am happy to look into but I am not proactively maintaining it.
Hi @Kludex, Just now I added support for interactive messages. Your error should be resolved and I've added some events to act on interactive messages more conveniently. Please let me know how this works for you. If you have suggestions to further improve the interactive message handling (or any other part of slackers), please don't hesitate to ask.
Hello there!
I've found an issue. When I have an action type being
interactive_message
, the data I receive doesn't contain anaction_id
, onlyname
,type
andselected_options
, therefore I receive this error:Can someone help me?
Changing the conditionals on the
server.actions
solves the problem:@uhavin are you still maintaining this package?
The text was updated successfully, but these errors were encountered: