Skip to content

Commit

Permalink
Add simple heuristic to reduce the number of sql queries in comment m…
Browse files Browse the repository at this point in the history
…entions handler.
  • Loading branch information
golozubov committed May 31, 2017
1 parent e881ed5 commit 2bb4a36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/support/EventService.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ export class EventService {
static async _processMentionsInComment(comment, post, commentAuthor) {
let mentions = extractMentionsWithIndices(comment.body);

if (mentions.length == 0) {
return;
}

let postGroupIntId = null;
const feeds = await post.getPostedTo();
if (feeds.length === 1) {
Expand Down

0 comments on commit 2bb4a36

Please sign in to comment.