Linkify room aliases. Add listener for user ID clicks.

This commit is contained in:
Kegan Dougal 2015-10-26 17:32:31 +00:00
parent a2b77ad5b5
commit a1444d3214

View file

@ -96,10 +96,21 @@ function matrixLinkify(linkify) {
}
matrixLinkify.options = {
events: function (href, type) {
if (type === "userid") {
return {
click: function(e) {
// sprout a MemberInfo context menu
console.log("Context => %s", href)
}
};
}
},
formatHref: function (href, type) {
switch (type) {
case 'roomalias':
return '#';
return "#/room/" + href;
case 'userid':
return '#';
default: