mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
Linkify room aliases. Add listener for user ID clicks.
This commit is contained in:
parent
a2b77ad5b5
commit
a1444d3214
@ -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 New Issue
Block a user