mostr-zulip-bot/zulip/integrations
i-ky 768959d633
rss-bot: Remove unnecessary "sender" in request data.
I've experienced that `rss-bot` works fine when using config file, but fails when `--site`, `--api-key`, and `--user` are provided via command line. The error is the following:
```
{'result': 'error', 'msg': 'Invalid mirrored message', 'code': 'BAD_REQUEST'}
```
Debugging shows that in the latter case `rss-bot` calls `zulip.Client.send_message()` with `"sender"` field in `message_data`. In the former case `"sender"` is `None`. Clearly, it is a bug that `rss-bot`'s behaviour depends on `--user` being provided on the command line.

`"sender"` field in request causes [this exception](e26f9180c1/zerver/views/message_send.py (L227)) on the server side.
Judging by surrounding code, `"sender"` is only expected together with a [specific set of clients](e26f9180c1/zerver/views/message_send.py (L186)). `rss-bot` uses a different one:
1b8f1d6e51/zulip/integrations/rss/rss-bot (L204)
Therefore I think, that providing `"sender"` is totally unnecessary.
2023-05-30 17:03:26 -07:00
..
bridge_between_zulips black: Reformat without skipping string normalization. 2021-06-02 18:45:57 -07:00
bridge_with_irc Rename default branch to ‘main’ 2021-08-24 12:50:52 -07:00
bridge_with_matrix Remove Python 3.6; add Python 3.10. 2023-01-24 12:04:59 -08:00
bridge_with_slack Slack bridge: Inform user to subscribe their Slack bot. 2022-10-19 15:17:15 -07:00
codebase pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
git lint: Pin black to avoid inconsistent formatting. 2023-05-29 10:53:22 -07:00
google pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
hg Rename default branch to ‘main’ 2021-08-24 12:50:52 -07:00
jabber pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
jira python: Remove per-file copyright notices. 2020-03-23 12:52:52 -07:00
log2zulip pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
nagios Replace typing.Text with str. 2021-08-24 20:07:35 -07:00
openshift lint: Pin black to avoid inconsistent formatting. 2023-05-29 10:53:22 -07:00
perforce lint: Pin black to avoid inconsistent formatting. 2023-05-29 10:53:22 -07:00
rss rss-bot: Remove unnecessary "sender" in request data. 2023-05-30 17:03:26 -07:00
svn lint: Pin black to avoid inconsistent formatting. 2023-05-29 10:53:22 -07:00
trac pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
trello pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
twitter pyupgrade: Reformat with --py36-plus. 2021-06-02 18:45:57 -07:00
zephyr lint: Pin black to avoid inconsistent formatting. 2023-05-29 10:53:22 -07:00
__init__.py matrix tests: tweak import and add __init__.py to ensure tests run. 2018-08-08 17:26:15 -07:00