python-zulip-api icon indicating copy to clipboard operation
python-zulip-api copied to clipboard

`ignored_parameters_unsupported` in `update_message`'s response

Open tmichela opened this issue 2 years ago • 2 comments

Hi,

I noticed that editing a message always return a ignored_parameters_unsupported for the message_id parameter, which is obviously a necessary parameter for this method (and is also documented here).

A simple example triggering the issue:

In [1]: c.update_message({
    ...:     'message_id': 12345,
    ...:     'topic':'✔ something',
    ...:     'propagate_mode': 'change_all'})
Out[1]: 
{'result': 'success',
 'msg': '',
 'ignored_parameters_unsupported': ['message_id']}

The same problem is not happening if I use curl instead of the python api.

zulip version: Python api: 0.8.2 server (zulip cloud): 8.0-dev-692-g16eb484152

Cheers, Thomas

tmichela avatar Aug 22 '23 14:08 tmichela

@zulipbot claim

axllbk avatar Oct 13 '24 20:10 axllbk

Hello @axllbk!

Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label.

If this is your first time here, we recommend reading our guide for new contributors before getting started.

zulipbot avatar Oct 13 '24 20:10 zulipbot

The same thing happens for remove_reaction and probably some other methods as well; I believe the root cause is that the methods don't strip message_id from the data attached to the API call, even though it's an unsupported parameter.

Here's the relevant line for update_message: https://github.com/zulip/python-zulip-api/blob/3a2c96e64619ede769ceb5d32532a23e364f105f/zulip/zulip/init.py#L873

And here's the relevant line for remove_reaction: https://github.com/zulip/python-zulip-api/blob/3a2c96e64619ede769ceb5d32532a23e364f105f/zulip/zulip/init.py#L968

bryangingechen avatar Aug 08 '25 03:08 bryangingechen