topic: Rename get_topic_history_for_web_public_stream.

This commit is contained in:
Aman 2020-08-21 20:42:34 +05:30 committed by Tim Abbott
parent 1f90a31fa3
commit c3a8492697
2 changed files with 3 additions and 3 deletions

View File

@ -201,7 +201,7 @@ def get_topic_history_for_stream(user_profile: UserProfile,
return generate_topic_history_from_db_rows(rows) return generate_topic_history_from_db_rows(rows)
def get_topic_history_for_web_public_stream(recipient: Recipient) -> List[Dict[str, Any]]: def get_topic_history_for_public_stream(recipient: Recipient) -> List[Dict[str, Any]]:
cursor = connection.cursor() cursor = connection.cursor()
query = ''' query = '''
SELECT SELECT

View File

@ -9,7 +9,7 @@ from zerver.lib.exceptions import JsonableError
from zerver.lib.response import json_success from zerver.lib.response import json_success
from zerver.lib.streams import get_stream_by_id from zerver.lib.streams import get_stream_by_id
from zerver.lib.timestamp import datetime_to_timestamp from zerver.lib.timestamp import datetime_to_timestamp
from zerver.lib.topic import get_topic_history_for_web_public_stream, messages_for_topic from zerver.lib.topic import get_topic_history_for_public_stream, messages_for_topic
from zerver.models import Message, UserProfile from zerver.models import Message, UserProfile
@ -85,6 +85,6 @@ def get_web_public_topics_backend(request: HttpRequest, stream_id: int) -> HttpR
if not stream.is_web_public: if not stream.is_web_public:
return json_success(dict(topics=[])) return json_success(dict(topics=[]))
result = get_topic_history_for_web_public_stream(recipient=stream.recipient) result = get_topic_history_for_public_stream(recipient=stream.recipient)
return json_success(dict(topics=result)) return json_success(dict(topics=result))