Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding durable messages to the normal stream of things.

  • Loading branch information...
commit 8039f254c61ac50441f1e3c3d5c42c820e6f9034 1 parent 38a4840
@simonwex simonwex authored
Showing with 7 additions and 7 deletions.
  1. +1 −1  app/http/socket.js
  2. +6 −6 app/serializer.js
View
2  app/http/socket.js
@@ -152,7 +152,7 @@ function sendContactListToUser(userId){
}
function sendRecentStories(user){
- mysql.query("SELECT * FROM stories WHERE user_id = ? AND durable = ? AND seen_at IS NULL ORDER BY published_at DESC LIMIT 30", [user.id, false], function(err, rows){
+ mysql.query("SELECT * FROM stories WHERE user_id = ? AND seen_at IS NULL ORDER BY published_at DESC LIMIT 30", [user.id], function(err, rows){
if (err){
logger.error("Error loading stories for user: " + user.email);
logger.error(err);
View
12 app/serializer.js
@@ -139,12 +139,12 @@ function waitForStory(){
logger.error("Error publishing notifications.mention.new: " + err);
});
}
- else {
- pubRedis.publish('feeds.storyForUser', JSON.stringify({'userId': userId, 'story': story}), function(err){
- if (err)
- logger.error(err);
- });
- }
+
+ // We always generate a new story for the sidebar
+ pubRedis.publish('feeds.storyForUser', JSON.stringify({'userId': userId, 'story': story}), function(err){
+ if (err)
+ logger.error(err);
+ });
}
}
);
Please sign in to comment.
Something went wrong with that request. Please try again.