Linkify room aliases. Add listener for user ID clicks.
This commit is contained in:
parent
a2b77ad5b5
commit
a1444d3214
1 changed files with 12 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue