-
Notifications
You must be signed in to change notification settings - Fork 835
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
feat: add support for conversations.requestShared
approve
, deny
& list
#1530
feat: add support for conversations.requestShared
approve
, deny
& list
#1530
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1530 +/- ##
==========================================
- Coverage 85.04% 84.85% -0.20%
==========================================
Files 113 113
Lines 12501 12546 +45
==========================================
+ Hits 10632 10646 +14
- Misses 1869 1900 +31 ☔ View full report in Codecov by Sentry. |
conversations.requestShared
approve
and deny
conversations.requestShared
approve
, deny
& list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for taking this on 🙇
invite_id: str, | ||
channel_id: Optional[str] = None, | ||
is_external_limited: Optional[str] = None, | ||
message: Optional[Dict[str, Any]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one note about message
here is that if it is provided, text
inside of message
is required. not sure if that is possible to model in Python but figured I'd mention it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No way to describe such in Python's type hints. The only approaches we can think of would be 1) accept both dict and custom class that has "text" property, 2) add runtime validation that checks if the key is not missing. That said, as long as the server-side returns a clear error code/message for the pattern, I don't think we should do extra on the client code side.
Not a blocker, but are we planning on releasing this after the methods are public? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me; we can ship it once the API deployments to customers are 100% done
"message": message, | ||
} | ||
) | ||
if message is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you have these lines of code, the above "message": message,
is unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch 💯
invite_id: str, | ||
channel_id: Optional[str] = None, | ||
is_external_limited: Optional[str] = None, | ||
message: Optional[Dict[str, Any]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No way to describe such in Python's type hints. The only approaches we can think of would be 1) accept both dict and custom class that has "text" property, 2) add runtime validation that checks if the key is not missing. That said, as long as the server-side returns a clear error code/message for the pattern, I don't think we should do extra on the client code side.
Summary
This PR aims to introduce support for conversations.requestShared.approve/deny/list API methods
Testing
N/A
Category
/docs-src
(Documents, have you run./scripts/docs.sh
?)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.