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 = { 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) { formatHref: function (href, type) {
switch (type) { switch (type) {
case 'roomalias': case 'roomalias':
return '#'; return "#/room/" + href;
case 'userid': case 'userid':
return '#'; return '#';
default: default: