mostr-zulip-bot/zulip/integrations/rss
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
..
requirements.txt zulip package: Add requirements.txt for each integration. 2017-09-12 01:39:21 -07:00
rss-bot rss-bot: Remove unnecessary "sender" in request data. 2023-05-30 17:03:26 -07:00