mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-28 00:20:48 +00:00
allow clicking lxmf urls in nomadnet pages to open conversation
This commit is contained in:
parent
5ace093e04
commit
1958f1d9ba
1 changed files with 14 additions and 0 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue