streams: Add API support to update folder of a stream.

Fixes part of #31972.
This commit is contained in:
Sahil Batra
2025-05-14 20:08:47 +05:30
committed by Tim Abbott
parent 75ac85ff4c
commit 2f34e6d24c
9 changed files with 222 additions and 1 deletions

View File

@@ -545,6 +545,7 @@ def check_stream_update(
"stream_id",
"first_message_id",
"is_archived",
"folder_id",
}
if prop == "description":
@@ -584,6 +585,9 @@ def check_stream_update(
elif prop == "is_archived":
assert extra_keys == set()
assert isinstance(value, bool)
elif prop == "folder_id":
assert extra_keys == set()
assert value is None or isinstance(value, int)
else:
raise AssertionError(f"Unknown property: {prop}")