subject -> topic: Fix respond_to_message().

This commit is contained in:
Steve Howell
2018-11-15 18:23:17 +00:00
committed by Tim Abbott
parent 82b9f2a3db
commit 68d81cb25b
2 changed files with 7 additions and 3 deletions

View File

@@ -304,10 +304,10 @@ exports.respond_to_message = function (opts) {
unread_ops.notify_server_message_read(message);
var stream = '';
var subject = '';
var topic = '';
if (message.type === "stream") {
stream = message.stream;
subject = message.subject;
topic = util.get_topic(message);
}
var pm_recipient = message.reply_to;
@@ -326,7 +326,7 @@ exports.respond_to_message = function (opts) {
} else {
msg_type = message.type;
}
exports.start(msg_type, {stream: stream, subject: subject,
exports.start(msg_type, {stream: stream, subject: topic,
private_message_recipient: pm_recipient,
replying_to_message: message,
trigger: opts.trigger});

View File

@@ -295,6 +295,10 @@ exports.set_topic = function (obj, topic) {
obj.subject = topic;
};
exports.get_topic = function (obj) {
return obj.subject;
};
return exports;
}());