-
-
Notifications
You must be signed in to change notification settings - Fork 277
Feature: Improve Stream Info Popup #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,6 +217,7 @@ def general_stream() -> Dict[str, Any]: | |
"stream_weekly_traffic": 0, | ||
"push_notifications": False, | ||
"email_address": "[email protected]", | ||
"message_retention_days": 10, | ||
"subscribers": [1001, 11, 12], | ||
} | ||
|
||
|
@@ -240,6 +241,7 @@ def secret_stream() -> Dict[str, Any]: | |
"is_old_stream": True, | ||
"desktop_notifications": False, | ||
"stream_weekly_traffic": 0, | ||
"message_retention_days": -1, | ||
"push_notifications": False, | ||
"subscribers": [1001, 11], | ||
} | ||
|
@@ -267,6 +269,7 @@ def streams_fixture( | |
"desktop_notifications": False, | ||
"stream_weekly_traffic": 0, | ||
"push_notifications": False, | ||
"message_retention_days": i + 30, | ||
"email_address": f"stream{i}@example.com", | ||
"subscribers": [1001, 11, 12], | ||
} | ||
|
@@ -742,6 +745,7 @@ def initial_data( | |
}, | ||
"twenty_four_hour_time": True, | ||
"realm_emoji": realm_emojis, | ||
"realm_message_retention_days": 74, | ||
"last_event_id": -1, | ||
"muted_topics": [], | ||
"realm_user_groups": [], | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is the
None
case that I queried elsewhere, where the organization value slips through to the stream level.Was
None
a realm value, though? I assume it followed the original rule, ie. -1 for indefinite and +n for days, so I'm not sure about None?The #api-design topic doesn't seem to have clarified this exactly, so perhaps Mateusz could answer in a follow-up or you could refer him here?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, this is why we were handling the
days == None
case earlier.To clarify,
None
was a realm value earlier (between server v2-3, as per my testing on the dev server) and it had the same meaning as the current-1
for indefinite which was changed by @mateuszmandera's commit afterwards. So to summarize, I believe this is how the server's representation for message retention changed over time:None
for indefinite and +n for days. No stream valueNone
for org default,-1
for indefinite and +n for days.None
value was changed to-1
by Mateusz's above commit for consistency with the stream value(I hope Mateusz should get notification from the above mention, still, I'll refer him here from the stream to confirm my hypothesis)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that was an interesting dive through old commits 😀 This overview sounds correct to me based on that. To be a bit more precise,
message_retention_days
was a thing for streams before 3.0 but only in the sense of the backend logic - but it indeed wasn't exposed via the API in any way (the value had to be set manually viamanage.py shell
or db query). I presume thatzulip-terminal
only cares about the API history here though, where indeed this is only a thing since 3.0 - zulip/zulip@c488a35