Topic muting
PATCH https://mylog.connect.xfel.eu/api/v1/users/me/subscriptions/muted_topics
This endpoint mutes/unmutes a topic within a stream that the current
user is subscribed to. Muted topics are displayed faded in the Zulip
UI, and are not included in the user's unread count totals.
Changes: Deprecated in Zulip 7.0 (feature level 170). Clients connecting
to the newer server should use the /user_topics
endpoint instead.
It will be removed once clients have migrated to use the
/user_topics
endpoint.
Before Zulip 7.0 (feature level 169), this endpoint
returned an error if asked to mute a topic that was already muted
or asked to unmute a topic that had not previously been muted.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Mute the topic "boat party" in the stream "Denmark"
request = {
"stream": "Denmark",
"topic": "boat party",
"op": "add",
}
result = client.mute_topic(request)
# Unmute the topic "boat party" in the stream "Denmark"
request = {
"stream": "Denmark",
"topic": "boat party",
"op": "remove",
}
result = client.mute_topic(request)
print(result)
curl -sSX PATCH https://mylog.connect.xfel.eu/api/v1/users/me/subscriptions/muted_topics \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode stream=Denmark \
--data-urlencode topic=dinner \
--data-urlencode op=add
Parameters
stream_id integer optional
Example: 43
The ID of the stream to access.
Clients must provide either stream
or stream_id
as a parameter
to this endpoint, but not both.
Changes: New in Zulip 2.0.0.
stream string optional
Example: "Denmark"
The name of the stream to access.
Clients must provide either stream
or stream_id
as a parameter
to this endpoint, but not both. Clients should use stream_id
instead of the stream
parameter when possible.
topic string required
Example: "dinner"
The topic to (un)mute. Note that the request will succeed regardless of
whether any messages have been sent to the specified topic.
op string required
Example: "add"
Whether to mute (add
) or unmute (remove
) the provided topic.
Must be one of: "add"
, "remove"
.
Response
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported
array.
A typical successful JSON response may look like:
{
"msg": "",
"result": "success"
}