mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
request: Store client information using ZulipRequestNotes.
This concludes the HttpRequest migration to eliminate arbitrary attributes (except private ones that are belong to django) attached to the request object during runtime and migrated them to a separate data structure dedicated for the purpose of adding information (so called notes) to a HttpRequest.
This commit is contained in:
@@ -16,6 +16,7 @@ from zerver.lib.i18n import (
|
||||
get_language_list,
|
||||
get_language_translation_data,
|
||||
)
|
||||
from zerver.lib.request import get_request_notes
|
||||
from zerver.models import Message, Realm, Stream, UserProfile
|
||||
from zerver.views.message_flags import get_latest_update_message_flag_activity
|
||||
|
||||
@@ -138,9 +139,11 @@ def build_page_params_for_home_page_load(
|
||||
}
|
||||
|
||||
if user_profile is not None:
|
||||
client = get_request_notes(request).client
|
||||
assert client is not None
|
||||
register_ret = do_events_register(
|
||||
user_profile,
|
||||
request.client,
|
||||
client,
|
||||
apply_markdown=True,
|
||||
client_gravatar=True,
|
||||
slim_presence=True,
|
||||
|
||||
Reference in New Issue
Block a user