When finding all groups involving a number, load from DB not memory

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-21 11:00:25 -07:00
parent 0adc398a6f
commit 3e0fa995dd
3 changed files with 12 additions and 10 deletions

View file

@ -320,9 +320,10 @@
message.save().then(this.trigger.bind(this,'newmessage', message));
if (this.isPrivate()) {
var groups = ConversationController.getAllGroupsInvolvingId(id);
_.forEach(groups, function(group) {
group.addVerifiedChange(id, verified, options);
ConversationController.getAllGroupsInvolvingId(id).then(function(groups) {
_.forEach(groups, function(group) {
group.addVerifiedChange(id, verified, options);
});
});
}
},