message: bring back old behaviour to also show member avatars if not marked as 1:1 room
diff: @@ -108,16 +108,29 @@ module.exports = React.createClass({
  },
  getOneToOneAvatar: function(props) {
  - if (!props.room) return null;
  -
  - const otherUserId = DMRoomMap.shared().getUserIdForRoomId(props.room.roomId);
  - if (!otherUserId) {
  + const room = props.room;
  + if (!room) {
  return null;
  }
  - const otherMember = props.room.getMember(otherUserId);
  - if (!otherMember) {
  - return null;
  + let otherMember = null;
  + const otherUserId = DMRoomMap.shared().getUserIdForRoomId(room.roomId);
  + if (otherUserId) {
  + otherMember = room.getMember(otherUserId);
  + } else {
  + // if the room is not marked as a 1:1, but only has max 2 members
  + // then still try to show any avatar (pref. other member)
  + const totalMemberCount = room.getJoinedMemberCount() +
  + room.getInvitedMemberCount();
  + const members = room.currentState.getMembers();
  + if (totalMemberCount == 2) {
  + const myUserId = MatrixClientPeg.get().getUserId();
  + otherMember = members.find(m => m.userId !== myUserId);
  + } else if(totalMemberCount == 1) {
  + otherMember = members[0];
  }
  +
  + }
  + if (otherMember) {
  return otherMember.getAvatarUrl(
  MatrixClientPeg.get().getHomeserverUrl(),
  Math.floor(props.width * window.devicePixelRatio),
  @@ -125,6 +138,8 @@ module.exports = React.createClass({
  props.resizeMethod,
  false,
  );
  + }
  + return null;
  },
  onRoomAvatarClick: function() {
  