Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

topic: Remove now-unused REQ_topic.

Tim Abbott9348b87d73ce
diff --git a/zerver/actions/message_edit.py b/zerver/actions/message_edit.py
index f7aec18851f..f52c5ce6680 100644
--- a/zerver/actions/message_edit.py
+++ b/zerver/actions/message_edit.py
@@ -1263,9 +1263,9 @@ def check_update_message(
validate_user_can_edit_message(user_profile, message, edit_limit_buffer)
# The zerver/views/message_edit.py call point already strips this
- # via REQ_topic; so we can delete this line if we arrange a
+ # via OptionalTopic; so we can delete this line if we arrange a
# contract where future callers in the embedded bots system strip
- # use REQ_topic as well (or otherwise are guaranteed to strip input).
+ # use OptionalTopic as well (or otherwise are guaranteed to strip input).
if topic_name is not None:
topic_name = topic_name.strip()
if topic_name == message.topic_name():
diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py
index 7737c26ae1d..673f83936ec 100644
--- a/zerver/lib/topic.py
+++ b/zerver/lib/topic.py
@@ -7,7 +7,6 @@ from django.db import connection
from django.db.models import F, Func, JSONField, Q, QuerySet, Subquery, TextField, Value
from django.db.models.functions import Cast
-from zerver.lib.request import REQ
from zerver.lib.types import EditHistoryEvent
from zerver.lib.utils import assert_is_not_none
from zerver.models import Message, Reaction, Stream, UserMessage, UserProfile
@@ -46,17 +45,6 @@ def get_topic_from_message_info(message_info: dict[str, Any]) -> str:
return message_info["subject"]
-def REQ_topic() -> str | None:
- # REQ handlers really return a REQ, but we
- # lie to make the rest of the type matching work.
- return REQ(
- whence="topic",
- aliases=["subject"],
- converter=lambda var_name, x: x.strip(),
- default=None,
- )
-
-
"""
TRY TO KEEP THIS DIVIDING LINE.