Merge "chat: Update to the new api."
diff --git a/.jshintignore b/.jshintignore
index 334994a..12bd653 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1,3 +1,4 @@
build
node_modules
clients/web/js/v.io/x/chat/vdl
+clients/web/js/chat/vdl
diff --git a/clients/web/js/channel.js b/clients/web/js/channel.js
index 51d5acc..181cb61 100644
--- a/clients/web/js/channel.js
+++ b/clients/web/js/channel.js
@@ -76,16 +76,17 @@
// The implementation of sendMessage emits the message with the sender's
// name and timestamp.
- Service.prototype.sendMessage = function(ctx, text) {
+ Service.prototype.sendMessage = function(ctx, serverCall, text) {
+ var secCall = serverCall.securityCall;
that.emit('message', {
- sender: util.firstShortName(ctx.remoteBlessingStrings),
+ sender: util.firstShortName(secCall.remoteBlessingStrings),
text: text,
timestamp: new Date()
});
};
// openAuthorizer allows RPCs from all clients.
- var openAuthorizer = function(secCall, cb){ cb(null); };
+ var openAuthorizer = function(ctx, secCall, cb){ cb(null); };
var options = {authorizer: openAuthorizer};
var that = this;