refactor: Upstream calls to set_message_booleans.

We want to call `set_message_booleans` as soon as we
get data from the server, to avoid confusion about whether
`flags` is the authoritative field.

This commit has callers to `add_message_metadata` call
`set_message_booleans`.

This also sets us up to **not** call `set_message_booleans`
in the local echo codepath, where we can just have the
markdown processor set booleans natively.
This commit is contained in:
Steve Howell
2017-12-16 17:05:32 -05:00
committed by showell
parent e96b3ffc5a
commit 4d8d17d134
4 changed files with 5 additions and 2 deletions

View File

@@ -121,8 +121,6 @@ exports.add_message_metadata = function (message) {
message.sent_by_me = people.is_current_user(message.sender_email);
exports.set_message_booleans(message);
people.extract_people_from_message(message);
people.maybe_incr_recipient_count(message);