Permalink
Browse files

fixed error when email does not exist

  • Loading branch information...
1 parent 642cb0c commit d3af3652f1cdcb0bbfc667203b01dc26af056aec @rodsimpson rodsimpson committed Mar 27, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 app/controllers/MsgController.js
View
7 app/controllers/MsgController.js
@@ -130,16 +130,17 @@ app.controllers.MsgController = new Ext.Controller({
app.views.viewport.setActiveItem(app.views.newMsgPanel, options.animation);
},
send: function(options) {
-
+ var email = '';
+ if (client.loggedInUser.email) { email = hex_md5(client.loggedInUser.email); }
var data= {
actor: {
displayName: appUser,
image : {
- url: "http://www.gravatar.com/avatar/" + hex_md5(client.loggedInUser.email),
+ url: "http://www.gravatar.com/avatar/" + email,
height: 80,
width: 80
},
- email: client.loggedInUser.email
+ email: email
},
verb: "post",
content: app.views.newMsgPanel.getText()

0 comments on commit d3af365

Please sign in to comment.