Skip to content

Commit 06c5dc4

Browse files
committed
小重构
1 parent 87f20c3 commit 06c5dc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

proxy/message.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ exports.getMessageById = function (id, callback) {
3535
}
3636
if (message.type === 'reply' || message.type === 'reply2' || message.type === 'at') {
3737
var proxy = new EventProxy();
38+
proxy.fail(callback);
3839
proxy.assign('author_found', 'topic_found', 'reply_found', function (author, topic, reply) {
3940
message.author = author;
4041
message.topic = topic;
@@ -43,7 +44,7 @@ exports.getMessageById = function (id, callback) {
4344
message.is_invalid = true;
4445
}
4546
return callback(null, message);
46-
}).fail(callback); // 接收异常
47+
}); // 接收异常
4748
User.getUserById(message.author_id, proxy.done('author_found'));
4849
Topic.getTopicById(message.topic_id, proxy.done('topic_found'));
4950
Reply.getReplyById(message.reply_id, proxy.done('reply_found'));

0 commit comments

Comments
 (0)