Skip to content

Conversation

@sujanyd
Copy link

@sujanyd sujanyd commented Nov 11, 2025

This PR adds support for using "direct" as the message type when sending private messages via the Zulip Python API CLI.

Key Changes:
• CLI now accepts "direct" as a valid message type (--type direct).
• Automatically translates "direct" → "private" for servers with API feature level < 174 (older servers).
• Keeps "direct" unchanged for newer servers (feature level ≥ 174).
• Logging updated to show the actual message type being sent.

What does this PR do?
This PR adds support for sending messages using the "direct" message type
in the Zulip CLI. It improves compatibility with new Zulip server versions
(feature level 174+) where "direct" replaces "private".

Why is this needed?
Older versions of the Zulip CLI only supported "private" and "stream" message
types. This update aligns the CLI with Zulip’s modern message API.

How it works

  • Added fallback logic: if the server feature level < 174, it falls back
    to using "private".
  • Updated CLI message type validation and logging.

Testing:
• Verified sending messages with "direct" and "private".
• Checked correct fallback for older servers.

Related Issue:
Fixes #779

@alya
Copy link
Contributor

alya commented Nov 12, 2025

Thanks! Please go through our guide on submitting a pull request to learn how to present your proposed changes to Zulip, so that your work can be reviewed. Please carefully review our AI use policy as well.

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.

Support using "direct" as the message "type" for private messages.

3 participants