allow clicking lxmf urls in nomadnet pages to open conversation
This commit is contained in:
@@ -985,6 +985,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this.openLXMFConversation(destinationHash);
|
||||
|
||||
},
|
||||
openLXMFConversation(destinationHash) {
|
||||
|
||||
// attempt to find existing peer so we can show their name
|
||||
const existingPeer = this.peers[destinationHash];
|
||||
if(existingPeer){
|
||||
@@ -1359,6 +1364,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// lxmf urls should open the conversation
|
||||
if(url.startsWith("lxmf@")){
|
||||
const destinationHash = url.replace("lxmf@", "");
|
||||
if(destinationHash.length === 32){
|
||||
this.openLXMFConversation(destinationHash);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// attempt to parse url
|
||||
const parsedUrl = this.parseNomadnetworkUrl(url);
|
||||
if(parsedUrl != null){
|
||||
|
||||
Reference in New Issue
Block a user