diff --git a/app/app.html b/app/app.html
index 8477e53..9990150 100755
--- a/app/app.html
+++ b/app/app.html
@@ -155,7 +155,7 @@
by {{ post.creator.username }}
-
+
{{ button.text }}
@@ -167,7 +167,7 @@
{{ post.author.username }}
- {{ post.content }}
+ {{ post.content }}
diff --git a/app/resources/js/app.js b/app/resources/js/app.js
index f668d35..9aeb6b9 100755
--- a/app/resources/js/app.js
+++ b/app/resources/js/app.js
@@ -261,7 +261,16 @@ const app = new Vue({
},
processMessage: async function(messageObject) {
if (!this.messages[messageObject.category._id]) this.$set(this.messages, messageObject.category._id, []);
- this.messages[messageObject.category._id].push(messageObject);
+ const categoryMessageList = this.messages[messageObject.category._id];
+
+ const lastMessageIndex = categoryMessageList.length-1;
+ const lastMessage = categoryMessageList[lastMessageIndex];
+ if (lastMessage && lastMessage.author._id === messageObject.author._id) {
+ categoryMessageList[lastMessageIndex].content += `\n${messageObject.content}`
+ } else {
+ this.messages[messageObject.category._id].push(messageObject);
+ }
+
if (messageObject.category._id === this.selection.category._id) {
this.$nextTick(() => {
diff --git a/notes.txt b/notes.txt
index 4a3f212..7b9db78 100755
--- a/notes.txt
+++ b/notes.txt
@@ -1,3 +1,6 @@
vulns:
- you can send a malformed request and express will send the full error
- - 2 users can have the same name if one of the letters is uppercase
\ No newline at end of file
+ - 2 users can have the same name if one of the letters is uppercase
+
+notes:
+ - please remove excessive whitespace please
\ No newline at end of file