import debug from "debug" ; import RootStore from "../stores" ; const log = debug ( "effect:chat" ) ; export const openChat = ( { ui } ) => ( ) => { log ( "openChat()" ) ; ui . isChatOpen = true ; } ; export const closeChat = ( { ui } ) => ( ) => { log ( "closeChat()" ) ; ui . isChatOpen = false ; } ; export const sendChat = ( { room , client } ) => ( text ) => { log ( "sendChat()" , text ) ; room . addLocalChat ( client . displayName , text ) ; } ;