Rename user-visible uses of "subject" to "topic".

(imported from commit 19e08a13624686da8703fcb8b5eefe2e29edf64b)
This commit is contained in:
Jessica McKellar
2013-07-16 15:00:52 -04:00
parent d61ebc2385
commit dac5a46fa4
14 changed files with 23 additions and 23 deletions

View File

@@ -403,12 +403,12 @@ def check_message(sender, client, message_type_name, message_to,
return "Invalid stream name"
if subject_name is None:
return "Missing subject"
return "Missing topic"
subject = subject_name.strip()
if subject == "":
return "Subject can't be empty"
return "Topic can't be empty"
if len(subject) > MAX_SUBJECT_LENGTH:
return "Subject too long"
return "Topic too long"
## FIXME: Commented out temporarily while we figure out what we want
# if not valid_stream_name(subject):
# return json_error("Invalid subject name")
@@ -992,10 +992,10 @@ def do_update_message(user_profile, message_id, subject, content):
if subject is not None:
subject = subject.strip()
if subject == "":
raise JsonableError("Subject can't be empty")
raise JsonableError("Topic can't be empty")
if len(subject) > MAX_SUBJECT_LENGTH:
raise JsonableError("Subject too long")
raise JsonableError("Topic too long")
event["orig_subject"] = message.subject
message.subject = subject
event["subject"] = subject