|
@@ -20,7 +20,7 @@ Router.route("/chat/:_id", {
|
|
return Meteor.subscribe("chats");
|
|
return Meteor.subscribe("chats");
|
|
},
|
|
},
|
|
|
|
|
|
- action: function (req, wtf, next) {
|
|
|
|
|
|
+ action: function (req) {
|
|
// Meteor._debug("Action", req.url);
|
|
// Meteor._debug("Action", req.url);
|
|
if (this.ready()) {
|
|
if (this.ready()) {
|
|
console.log("- Now ready");
|
|
console.log("- Now ready");
|
|
@@ -28,7 +28,7 @@ Router.route("/chat/:_id", {
|
|
// The user they want to chat to has id equal to the id sent in after /chat/...
|
|
// The user they want to chat to has id equal to the id sent in after /chat/...
|
|
const otherUserId = this.params._id;
|
|
const otherUserId = this.params._id;
|
|
const myId = Meteor.userId();
|
|
const myId = Meteor.userId();
|
|
- chatManager.assignChatId(myId, otherUserId, Session);
|
|
|
|
|
|
+ chatManager.assignChatId(myId ? myId : "anon", otherUserId ? otherUserId : "anon", Session);
|
|
if (Session.get("chatId")) {
|
|
if (Session.get("chatId")) {
|
|
this.render("navbar", { to: "header" });
|
|
this.render("navbar", { to: "header" });
|
|
this.render("chat_page", {
|
|
this.render("chat_page", {
|