notherbase-fs 3.3.9 → 3.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/models/user.js
CHANGED
|
@@ -80,8 +80,8 @@ export default class User extends Spirit {
|
|
|
80
80
|
},
|
|
81
81
|
inventory: []
|
|
82
82
|
});
|
|
83
|
-
user.id =
|
|
84
|
-
user.data =
|
|
83
|
+
user.id = user.memory._id;
|
|
84
|
+
user.data = user.memory.data.backups[0].data;
|
|
85
85
|
user.email = user.data.email;
|
|
86
86
|
await user.commit();
|
|
87
87
|
|
package/package.json
CHANGED
package/public/js/chat-box.js
CHANGED
|
@@ -71,8 +71,15 @@ class ChatBox {
|
|
|
71
71
|
/**
|
|
72
72
|
* Sends a new chat message to the server.
|
|
73
73
|
*/
|
|
74
|
-
sendMessage = () => {
|
|
75
|
-
if (
|
|
74
|
+
sendMessage = (override = null) => {
|
|
75
|
+
if (override !== null) {
|
|
76
|
+
this.socket.emit('chat message', {
|
|
77
|
+
name: this.username,
|
|
78
|
+
time: Date.now(),
|
|
79
|
+
text: override
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
else if (this.$entry.val() !== ""){
|
|
76
83
|
let val = this.$entry.val();
|
|
77
84
|
this.$entry.val("");
|
|
78
85
|
|
|
@@ -25,4 +25,6 @@
|
|
|
25
25
|
let chatTest = new ChatBox("<%= user.username %>", "test-chat");
|
|
26
26
|
let chatTest2 = new ChatBox("<%= user.username %>", "test-chat-2");
|
|
27
27
|
let chatTest3 = new ChatBox("<%= user.username %>", "test-chat-3");
|
|
28
|
+
|
|
29
|
+
chatTest.sendMessage("Hello, world!");
|
|
28
30
|
</script>
|