diff options
author | Joas Schilling <coding@schilljs.com> | 2021-10-22 16:45:08 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-22 16:45:08 +0300 |
commit | 9416090ea5520d74769fc366d08f83515390de12 (patch) | |
tree | 21930c74fa1729b9b0fd571df33069b14951c54b /src/store/messagesStore.js | |
parent | bc1050b38a203b848e8f3f4f265f8b5959034c97 (diff) |
Fix forwarding object shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/store/messagesStore.js')
-rw-r--r-- | src/store/messagesStore.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js index 221ae5bd6..b1816db32 100644 --- a/src/store/messagesStore.js +++ b/src/store/messagesStore.js @@ -26,6 +26,7 @@ import { fetchMessages, lookForNewMessages, postNewMessage, + postRichObjectToConversation, } from '../services/messagesService' import SHA1 from 'crypto-js/sha1' @@ -897,6 +898,20 @@ const actions = { const response = await postNewMessage(messageToBeForwarded) return response }, + + /** + * Posts a simple text message to a room + * + * @param {object} context default store context; + * will be forwarded; + * @param {object} data the wrapping object; + * @param {string} data.token token of the target conversation + * @param {object} data.richObject the rich object; + */ + async forwardRichObject(context, { token, richObject }) { + const response = await postRichObjectToConversation(token, richObject) + return response + }, } export default { state, mutations, getters, actions } |