diff options
author | nickago <ngonella@calpoly.edu> | 2015-07-13 09:22:42 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-07-13 09:22:42 -0700 |
commit | c485dad84f9a94c3d1261f7e2207baf071c2d3ca (patch) | |
tree | 343be0909df527475c947e112cd100b14b8895d8 /web/react/components/mention.jsx | |
parent | f5d188e1caa4b27eb4878de41e479199ca0cafda (diff) | |
download | chat-c485dad84f9a94c3d1261f7e2207baf071c2d3ca.tar.gz chat-c485dad84f9a94c3d1261f7e2207baf071c2d3ca.tar.bz2 chat-c485dad84f9a94c3d1261f7e2207baf071c2d3ca.zip |
Added update function to image update and fixed corner cases
Diffstat (limited to 'web/react/components/mention.jsx')
-rw-r--r-- | web/react/components/mention.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx index 3c33ddf49..520b81cbb 100644 --- a/web/react/components/mention.jsx +++ b/web/react/components/mention.jsx @@ -1,5 +1,6 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. +var UserStore = require("../stores/user_store.jsx"); module.exports = React.createClass({ handleClick: function() { @@ -7,8 +8,9 @@ module.exports = React.createClass({ }, render: function() { var icon; + var timestamp = UserStore.getCurrentUser().update_at; if (this.props.id != null) { - icon = <span><img className="mention-img" src={"/api/v1/users/" + this.props.id + "/image"}/></span>; + icon = <span><img className="mention-img" src={"/api/v1/users/" + this.props.id + "/image?time=" + timestamp}/></span>; } else { icon = <span><i className="mention-img fa fa-users fa-2x"></i></span>; } |