mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
api_get_messages: Use POST() for apply_markdown.
(imported from commit 4e0e57d6b93cd9410cf946069ea987c26e0f4f5d)
This commit is contained in:
parent
0f1be6a9f6
commit
87eabc5159
@ -235,7 +235,9 @@ def json_get_old_messages(request, user_profile):
|
||||
|
||||
@authenticated_api_view
|
||||
@has_request_variables
|
||||
def api_get_old_messages(request, user_profile, apply_markdown=POST(default=False)):
|
||||
def api_get_old_messages(request, user_profile,
|
||||
apply_markdown=POST(default=False,
|
||||
converter=simplejson.loads)):
|
||||
return get_old_messages_backend(request, user_profile=user_profile,
|
||||
apply_markdown=apply_markdown)
|
||||
|
||||
@ -297,9 +299,10 @@ def json_get_updates(request, user_profile, handler):
|
||||
@asynchronous
|
||||
@authenticated_api_view
|
||||
@has_request_variables
|
||||
def api_get_messages(request, user_profile, handler, client_id=POST(default=None)):
|
||||
def api_get_messages(request, user_profile, handler, client_id=POST(default=None),
|
||||
apply_markdown=POST(default=False, converter=simplejson.loads)):
|
||||
return get_updates_backend(request, user_profile, handler, client_id,
|
||||
apply_markdown=(request.POST.get("apply_markdown") is not None),
|
||||
apply_markdown=apply_markdown,
|
||||
mirror=request.POST.get("mirror"))
|
||||
|
||||
def format_updates_response(messages=[], apply_markdown=True,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user