mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-07 07:30:23 +03:00
chat: linkify unmanaged chats
This commit is contained in:
parent
057d5996d1
commit
6464dc89ce
@ -125,11 +125,11 @@ export class Message extends Component {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
let chatroom = letter.text.match(
|
let chatroom = letter.text.match(
|
||||||
/(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z])+([/-])?)+/
|
/([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z])+([/-])?)+/
|
||||||
);
|
);
|
||||||
if ((chatroom !== null) // matched possible chatroom
|
if ((chatroom !== null) // matched possible chatroom
|
||||||
&& (chatroom[1].length > 2) // possible ship?
|
&& (chatroom[2].length > 2) // possible ship?
|
||||||
&& (urbitOb.isValidPatp(chatroom[1]) // valid patp?
|
&& (urbitOb.isValidPatp(chatroom[2]) // valid patp?
|
||||||
&& (chatroom[0] === letter.text))) { // entire message is room name?
|
&& (chatroom[0] === letter.text))) { // entire message is room name?
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
Loading…
Reference in New Issue
Block a user