mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Fix userId undefined in pillifyLinks
This commit is contained in:
parent
ecaf6e5223
commit
2f293adad5
1 changed files with 5 additions and 3 deletions
|
@ -186,13 +186,15 @@ module.exports = React.createClass({
|
||||||
let roomId;
|
let roomId;
|
||||||
let room;
|
let room;
|
||||||
let member;
|
let member;
|
||||||
|
let userId;
|
||||||
switch (resourceType) {
|
switch (resourceType) {
|
||||||
case "user":
|
case "user":
|
||||||
roomId = this.props.mxEvent.getRoomId();
|
roomId = this.props.mxEvent.getRoomId();
|
||||||
room = MatrixClientPeg.get().getRoom(roomId);
|
room = MatrixClientPeg.get().getRoom(roomId);
|
||||||
member = room.getMember(resourceId) ||
|
userId = resourceId;
|
||||||
new RoomMember(null, resourceId);
|
member = room.getMember(userId) ||
|
||||||
avatar = <MemberAvatar member={member} width={16} height={16} name={resourceId}/>;
|
new RoomMember(null, userId);
|
||||||
|
avatar = <MemberAvatar member={member} width={16} height={16} name={userId}/>;
|
||||||
break;
|
break;
|
||||||
case "room":
|
case "room":
|
||||||
room = resourceId[0] === '#' ?
|
room = resourceId[0] === '#' ?
|
||||||
|
|
Loading…
Reference in a new issue