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 = {
|
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:
|
||||||
|
|
Loading…
Reference in a new issue