empiricaly / chat Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I am currently using the empirica chat feature where it allows all users in the current session to chat with one another, but I am trying to implement the chat so that users can only chat with specific "neighbors" that have been set for them. Is there a configuration setting to the chat API that would allow this?
The component do not update properly when a new message is coming. Current behavior is component always updating without not stop.
Included a chat in the lobby as:
import { LobbyChat } from "@empirica/chat";
Empirica.lobby(LobbyChat);
in client/main.js
,
had the following error when a player enters the lobby:
Error: Cannot read property 'get' of undefined
TypeError: Cannot read property 'get' of undefined
at t.value (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:63959)
at finishClassComponent (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:14859)
at updateClassComponent (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:14822)
at beginWork (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:15411)
at performUnitOfWork (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:17737)
at workLoop (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:17775)
at HTMLUnknownElement.callCallback (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:1466)
at Object.invokeGuardedCallbackDev (modules.js?hash=47e1d1ddb6a00c702e8fcce109f2c9f607994d60:1516)
react_devtools_backend.js:6 The above error occurred in the <t> component:
in t (created by t)
in div (created by t)
in div (created by t)
in div (created by t)
in t (created by t)
in div (created by t)
in t
in div
in GameLobbyContainer
in Game (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent
in main
in div
in Public (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent
in IdentifiedContainerInner (created by ReactMeteorDataComponent)
in ReactMeteorDataComponent
in Route
in Switch
in div
in Router
in BrowserRouter
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
@hubertusputu1 @npaton , I've added you as collaborators on a repo that experiences the problem.
Add a callback to get unread message, show a badge on header with the number of unread messages.
Unexpected behavior of chat timestamps:
<Chat player={player} scope={game}/>
yields NaN:NaN
for the timestamp.
This is with:
Also, I'm not entirely sure from the documentation what should be passed to the timestamp parameter - is this user's current clock time `Date.now()' or just a browser Date() object? Does this coordinate for user clocks not necessarily being synchronized?
When chatting using the enter key to send, triggers this warning:
Uncaught TypeError: Cannot read property 'preventDefault' of undefined
at o.handleSubmit (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:24057)
at onKeyPress (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:24057)
at HTMLUnknownElement.callCallback (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1466)
at Object.invokeGuardedCallbackDev (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1516)
at invokeGuardedCallback (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1569)
at invokeGuardedCallbackAndCatchFirstError (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1583)
at executeDispatch (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1914)
at executeDispatchesInOrder (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:1936)
at executeDispatchesAndRelease (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:2034)
at executeDispatchesAndReleaseTopLevel (modules.js?hash=cfa01d0b1989b1ac4f1e257f2151da0338ead237:2045)
"_id": "@empirica/[email protected]",
Create a callback for incomming message
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.