Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/0.1.0-alpha.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanmay Patel committed Dec 1, 2016
2 parents 611a68d + 9243b98 commit 53c8b0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions live/LiveConnectionFacade.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ class LiveConnectionFacade

subscribeToUpdatesForTopicBySocket(socket, topic)
{
let subscriber = socket.auth.credentials.userId;

let room = this.getRoomNameForTopic(topic);
socket.join(room, () =>
{
socket.emit('subscription-live', topic.toJS());

let retrieveMessagesForTopicCommand = new RetrieveMessagesForTopicCommand(topic, 0, 25);
let retrieveMessagesForTopicCommand = new RetrieveMessagesForTopicCommand(topic, subscriber, 0, 25);
retrieveMessagesForTopicCommand.execute()
.then((messages) =>
{
Expand All @@ -102,7 +104,7 @@ class LiveConnectionFacade
let roomForUserId = this.getRoomNameForUserId(userId);
_transport.to(roomForUserId).emit('subscription-live', topic.toJS());

let retrieveMessagesForTopicCommand = new RetrieveMessagesForTopicCommand(topic);
let retrieveMessagesForTopicCommand = new RetrieveMessagesForTopicCommand(topic, userId);
retrieveMessagesForTopicCommand.execute()
.then((messages) =>
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ting-server",
"version": "0.1.0-alpha.4",
"version": "0.1.0-alpha.5",
"description": "Durable and Realtime Messaging System primarily geared towards Web Apps",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 53c8b0b

Please sign in to comment.