mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-21 15:38:59 +03:00
Build and render arvo:// urls correctly
This commit is contained in:
parent
e6f962e76e
commit
34826d6e19
@ -173,7 +173,7 @@ export class ChatInput extends Component {
|
||||
//TODO send proper url speeches once hall starts using a url type that
|
||||
// supports non-http protocols.
|
||||
return { lin: {
|
||||
msg: 'arvo://' + url.slice(urlObject.origin.length+1),
|
||||
msg: 'arvo://' + url.slice(urlObject.origin.length),
|
||||
pat: false
|
||||
} };
|
||||
} else {
|
||||
|
@ -147,10 +147,7 @@ export class Message extends Component {
|
||||
if (url.indexOf(arvo) === 0) {
|
||||
// this application is being served by an urbit also, so /path will
|
||||
// point to the arvo url as hosted by this same urbit.
|
||||
let path = url.slice(arvo.length);
|
||||
// ensure single leading /
|
||||
if (path[0] !== '/') path = '/' + path;
|
||||
return path;
|
||||
return url.slice(arvo.length);
|
||||
} else {
|
||||
return url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user