-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: basic chat implementation #3
base: main
Are you sure you want to change the base?
Conversation
src/context/socketContext.js
Outdated
@@ -5,7 +5,7 @@ import io from 'socket.io-client' | |||
export const SocketContext = createContext() | |||
|
|||
export const SocketProvider = ({ children }) => { | |||
const socket = io('https://skaff-api.iteam.pub') | |||
const socket = io('http://localhost:3000') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to commit this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we do not! Thanks!
state.tenderRequests[tenderRequestIndex].messages = [ | ||
...tenderRequest.messages, | ||
message, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure I'm getting it, if we add the messages to the tender can we somehow filter them to only show the messages sent between the buyer (who published the tender) and each producer separately? Or do we show all the messages that are involved in the tender to every user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we show every message to everyone that is in the tender. I was not sure how the implementation was supposed to work, but since its a POC i think its fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I guess for a POC is enough, just wanted to make sure I was understanding correctly, it looks good then💃🏽
Implements rudimentary chat functionality across tender requests.
Also sends notification to all participants (including the sender for demo purposes).
Note: Also resolves some dependencies that were present in
package-lock.json
but omitted frompackage.json
. If this was intended in anyway, feel free to let me know so that I can revert those changes.