mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
minor: Add a code comment and move two constants.
This commit is contained in:
parent
b666a6bd6c
commit
aa4e9cec2d
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user