mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
request: Refactor ZulipRequestNotes to RequestNotes.
This utilizes the generic `BaseNotes` we added for multipurpose patching. With this migration as an example, we can further support more types of notes to replace the monkey-patching approach we have used throughout the codebase for type safety.
This commit is contained in:
@@ -15,7 +15,7 @@ from zerver.lib.i18n import (
|
||||
get_language_list,
|
||||
get_language_translation_data,
|
||||
)
|
||||
from zerver.lib.request import get_request_notes
|
||||
from zerver.lib.request import RequestNotes
|
||||
from zerver.models import Message, Realm, Stream, UserProfile
|
||||
from zerver.views.message_flags import get_latest_update_message_flag_activity
|
||||
|
||||
@@ -139,7 +139,7 @@ def build_page_params_for_home_page_load(
|
||||
}
|
||||
|
||||
if user_profile is not None:
|
||||
client = get_request_notes(request).client
|
||||
client = RequestNotes.get_notes(request).client
|
||||
assert client is not None
|
||||
register_ret = do_events_register(
|
||||
user_profile,
|
||||
|
||||
Reference in New Issue
Block a user