-
Notifications
You must be signed in to change notification settings - Fork 2
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
#187419198 User should interact with each others via chats publicly #48
Conversation
public/client.js
Outdated
</li> | ||
` | ||
chatsRoom.innerHTML += element; | ||
} |
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.
Missing semicolon.
} | ||
|
||
const addMessageToUi = (isOwner,data) =>{ | ||
const element = ` |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'template literal syntax' is only available in ES6 (use 'esversion: 6').
active.innerHTML += element; | ||
} | ||
|
||
const addMessageToUi = (isOwner,data) =>{ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
public/client.js
Outdated
</li> | ||
` | ||
active.innerHTML += element; | ||
} |
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.
Missing semicolon.
public/client.js
Outdated
active.innerHTML += element; | ||
} | ||
const onDisConnect = () =>{ | ||
const element = ` |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'template literal syntax' is only available in ES6 (use 'esversion: 6').
public/client.js
Outdated
}); | ||
}); | ||
|
||
const onConnected = () =>{ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const messagesList = document.getElementById("messages"); | ||
messagesList.innerHTML = ""; | ||
|
||
messages.forEach((msg) => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
d01cf59
to
a1ef798
Compare
public/client.js
Outdated
const sender = userNameInput.value; | ||
const message = messageInput.value; | ||
|
||
socket.emit('chat message', { sender, 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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
form.addEventListener("submit", (e) => { | ||
e.preventDefault(); | ||
const sender = userNameInput.value; | ||
const message = messageInput.value; |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const form = document.getElementById('send-message'); | ||
const messageInput = document.getElementById("message-input"); | ||
const userNameInput = document.getElementById("user-name"); | ||
const chatsRoom = document.getElementById("messages"); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const socket = io(); | ||
const form = document.getElementById('send-message'); | ||
const messageInput = document.getElementById("message-input"); | ||
const userNameInput = document.getElementById("user-name"); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); | |||
const form = document.getElementById('send-message'); | |||
const messageInput = document.getElementById("message-input"); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); | |||
const form = document.getElementById('send-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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
connectedClients.innerHTML = clients; | ||
}); | ||
|
||
socket.on('connected client',(clients) =>{ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
console.log('Connected to server'); | ||
}); | ||
|
||
socket.on('dis connected client', (clients) =>{ |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
messageInput.value = ''; | ||
}); | ||
|
||
socket.on('connect', () => { |
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.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
public/client.js
Outdated
const sender = userNameInput.value; | ||
const message = messageInput.value; | ||
|
||
socket.emit('chat message', { sender, 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.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
form.addEventListener("submit", (e) => { | ||
e.preventDefault(); | ||
const sender = userNameInput.value; | ||
const message = messageInput.value; |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); | |||
const form = document.getElementById('send-message'); | |||
const messageInput = document.getElementById("message-input"); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); | |||
const form = document.getElementById('send-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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,74 @@ | |||
const socket = io(); |
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.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
allowNull: false, | ||
type: Sequelize.DATE | ||
} | ||
}); |
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.
Unrecoverable syntax error. (83% scanned).
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.createTable('messages', { |
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.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
a1ef798
to
a752cb6
Compare
'use strict'; | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { |
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.
Expected ':' and instead saw 'up'.
Expected '}' to match '{' from line 3 and instead saw '{'.
Missing semicolon.
@@ -0,0 +1,31 @@ | |||
'use strict'; |
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.
Use the function form of "use strict".
a752cb6
to
4b3e4a6
Compare
Your Render PR Server URL is https://eagles-ec-be-development-pr-48.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cov3t4mn7f5s73bep4rg. |
4b3e4a6
to
ce0aa41
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #48 +/- ##
==========================================
- Coverage 79.28% 76.73% -2.56%
==========================================
Files 66 73 +7
Lines 1178 1255 +77
Branches 176 188 +12
==========================================
+ Hits 934 963 +29
- Misses 244 292 +48 ☔ View full report in Codecov by Sentry. |
ce0aa41
to
6bfe5ea
Compare
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.
LGTM
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.
LGTM
-an active user when joins the chat should be able to read the past message -an active user should be able to post publlic message -an active when send a message it can be encored to every connected user in real time [#187419198]
6bfe5ea
to
0d3b882
Compare
#187419198 User should interact with each others via chats publicly
What does this PR do?
Have chats room to interact with each other to ask information publicly.
Description of Task to be completed?
Have the following end point
GET: /api/v1/messages
How should this be manually tested?
After cloning the repo, cd into it and run npm run dev to start the server.
Any background context you want to provide?
when a user send a message it will be echoed to all online users
What are the relevant pivotal tracker stories?
[Delivers #187419198]