Browse Source

Added method "mediaStream.url.buddy" to get url of buddy image.

pull/15/head
Joachim Bauch 11 years ago
parent
commit
9137166bbe
  1. 3
      static/js/services/buddylist.js
  2. 3
      static/js/services/mediastream.js

3
static/js/services/buddylist.js

@ -325,8 +325,7 @@ define(['underscore', 'modernizr', 'avltree', 'text!partials/buddy.html', 'text! @@ -325,8 +325,7 @@ define(['underscore', 'modernizr', 'avltree', 'text!partials/buddy.html', 'text!
}
if (url.indexOf("img:") === 0) {
url = url.substr(4);
status.buddyPicture = status.buddyPictureLocalUrl = mediaStream.config.B + "static/img/buddy/s46/"+url;
status.buddyPicture = status.buddyPictureLocalUrl = mediaStream.url.buddy(url.substr(4));
}
};

3
static/js/services/mediastream.js

@ -69,6 +69,9 @@ define([ @@ -69,6 +69,9 @@ define([
id = $window.encodeURIComponent(id);
return $window.location.protocol+'//'+$window.location.host+context.Cfg.B+id;
},
buddy: function(id) {
return $window.location.protocol+'//'+$window.location.host+context.Cfg.B+"static/img/buddy/s46/"+id;
},
api: function(path) {
return (context.Cfg.B || "/") + "api/v1/" + path;
}

Loading…
Cancel
Save