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:
PIG208
2021-08-22 01:24:20 +08:00
committed by Tim Abbott
parent dba7b1e3a7
commit 53888e5a26
32 changed files with 124 additions and 124 deletions

View File

@@ -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,