Skip to content

Commit

Permalink
Merge pull request #285 from rwakida/bugfix/239
Browse files Browse the repository at this point in the history
Fix #239 room's message count and last message
  • Loading branch information
rodrigok committed Jul 9, 2015
2 parents 2d53406 + 1857d4e commit 26c1315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rocketchat-lib/server/sendMessage.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ RocketChat.sendMessage = (user, message, room) ->

ChatRoom.update
# only subscriptions to the same room
rid: message.rid
_id: message.rid
,
# update the last message timestamp
$set:
lm: message.ts
# increate the messages counter
# increment the messages counter
$inc:
msgs: 1

Expand Down

0 comments on commit 26c1315

Please sign in to comment.