mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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:
@@ -276,9 +276,9 @@ class ZulipWebhookFormatter(ZulipFormatter):
|
||||
)
|
||||
|
||||
header_message = header_text if header_text else None
|
||||
from zerver.lib.request import get_request_notes
|
||||
from zerver.lib.request import RequestNotes
|
||||
|
||||
client = get_request_notes(request).client
|
||||
client = RequestNotes.get_notes(request).client
|
||||
assert client is not None
|
||||
|
||||
setattr(record, "user", f"{request.user.delivery_email} ({request.user.realm.string_id})")
|
||||
|
||||
Reference in New Issue
Block a user