mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
chat: remove linking shortcodes to chatrooms
We use shortcodes for all channels now -- in general, we don't want people to be joining them as chats.
This commit is contained in:
parent
3f16359755
commit
078991864c
@ -124,29 +124,12 @@ export class Message extends Component {
|
||||
</p>
|
||||
);
|
||||
} else {
|
||||
let chatroom = letter.text.match(
|
||||
/([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z])+([/-])?)+/
|
||||
);
|
||||
if ((chatroom !== null) // matched possible chatroom
|
||||
&& (chatroom[2].length > 2) // possible ship?
|
||||
&& (urbitOb.isValidPatp(chatroom[2]) // valid patp?
|
||||
&& (chatroom[0] === letter.text))) { // entire message is room name?
|
||||
return (
|
||||
<Link
|
||||
className="bb b--black b--white-d f7 mono lh-copy v-top"
|
||||
to={"/~chat/join/" + chatroom.input}>
|
||||
{letter.text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
else {
|
||||
let text = letter.text.split ('\n').map ((item, i) => <p className='f7 lh-copy v-top' key={i}>{item}</p>);
|
||||
return (
|
||||
<section>
|
||||
{text}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user