Skip to content

Conversation

@joshishiv4
Copy link
Owner

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 zulip/python-zulip-api#779


Recreated from zulip/python-zulip-api#885

⚠ This PR was CLOSED upstream.

@joshishiv4 joshishiv4 closed this Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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