Skip to content

Conversation

@LoopThrough-i-j
Copy link
Contributor

Update reaction_data type in add_reaction and
remove_reaction, from Dict[str, str] to Dict[str, Any]

LoopThrough-i-j added a commit to LoopThrough-i-j/zulip that referenced this pull request Feb 23, 2021
The `message_id` was made an `str` object because
the request expected `Dict[str, str]`. The request is now
casted to `Dict[str, Any]` to fix the issue and removed
typecast of `message_id` to str.

python-zulip-api reference:
zulip/python-zulip-api#653
@amanagr
Copy link
Member

amanagr commented Feb 23, 2021

For both the PRs, you don't need to write the whole file name in the commit message. See https://zulip.readthedocs.io/en/latest/contributing/version-control.html#commit-messages

Something like reactions_api would be more appropriate.

Update `reaction_data` type in add_reaction and
remove_reaction, from Dict[str, str] to Dict[str, Any]
LoopThrough-i-j added a commit to LoopThrough-i-j/zulip that referenced this pull request Feb 23, 2021
The `message_id` was made an `str` object because
the request expected `Dict[str, str]`. The request is now
casted to `Dict[str, Any]` to fix the issue and removed
typecast of `message_id` to str.

python-zulip-api reference:
zulip/python-zulip-api#653
@LoopThrough-i-j
Copy link
Contributor Author

Actually, I saw Anders Kaseorg doing this for single file changes, hence thought that could be a better practice for a single file commit.

LoopThrough-i-j added a commit to LoopThrough-i-j/zulip that referenced this pull request Feb 23, 2021
The `message_id` was made an `str` object because
the request expected `Dict[str, str]`. The request is now
casted to `Dict[str, Any]` to fix the issue and removed
typecast of `message_id` to str.

python-zulip-api reference:
zulip/python-zulip-api#653
@rht
Copy link
Contributor

rht commented Feb 23, 2021

Posting the relevant discussion thread for future reference: https://chat.zulip.org/#narrow/stream/127-integrations/topic/msg.20id.20in.20add_emoji.20doc.

timabbott pushed a commit to zulip/zulip that referenced this pull request Feb 23, 2021
The `message_id` was made an `str` object because
the request expected `Dict[str, str]`. The request is now
casted to `Dict[str, Any]` to fix the issue and removed
typecast of `message_id` to str.

python-zulip-api reference:
zulip/python-zulip-api#653
@timabbott
Copy link
Member

Merged, thanks @LoopThrough-i-j!

@timabbott timabbott merged commit 3e28506 into zulip:master Feb 23, 2021
MSurfer20 pushed a commit to MSurfer20/zulip that referenced this pull request Feb 24, 2021
The `message_id` was made an `str` object because
the request expected `Dict[str, str]`. The request is now
casted to `Dict[str, Any]` to fix the issue and removed
typecast of `message_id` to str.

python-zulip-api reference:
zulip/python-zulip-api#653
@LoopThrough-i-j LoopThrough-i-j changed the title zulip/zulip/__init__.py: Update reaction_data type. zulip: Update reaction_data type. Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants