Skip to content
Snippets Groups Projects
Commit 43c9eafa authored by Endrizzi, Marco (UG - Comp Sci & Elec Eng)'s avatar Endrizzi, Marco (UG - Comp Sci & Elec Eng)
Browse files

Messages are now being stored in the database

parent aae54789
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,13 @@ const actions = {
messagesRef.off('child_added')
commit('clearMessages')
}
},
firebaseSendMessage({}, payload) {
firebaseDb.ref('chats/' + state.userDetails.userId + '/' + payload.otherUserId).push(payload.message)
payload.message.from = 'them'
firebaseDb.ref('chats/' + payload.otherUserId + '/' + state.userDetails.userId).push(payload.message)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment