diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py index c62d3f9c63..fdc752b7ec 100644 --- a/zerver/lib/topic.py +++ b/zerver/lib/topic.py @@ -36,12 +36,6 @@ LEGACY_PREV_TOPIC = "prev_subject" # database, but it's the JSON field. EXPORT_TOPIC_NAME = "subject" -# This is used in low-level message functions in -# zerver/lib/message.py, and it's not user facing. -DB_TOPIC_NAME = "subject" -MESSAGE__TOPIC = 'message__subject' - - def REQ_topic() -> Optional[str]: # REQ handlers really return a REQ, but we # lie to make the rest of the type matching work. @@ -52,6 +46,19 @@ def REQ_topic() -> Optional[str]: default=None, ) # type: ignore # see comment above +''' +TRY TO KEEP THIS DIVIDING LINE. + +Below this line we want to make it so that functions are only +using "subject" in the DB sense, and nothing customer facing. + +''' + +# This is used in low-level message functions in +# zerver/lib/message.py, and it's not user facing. +DB_TOPIC_NAME = "subject" +MESSAGE__TOPIC = 'message__subject' + def topic_match_sa(topic_name: str) -> Any: # _sa is short for Sql Alchemy, which we use mostly for # queries that search messages