Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/conversationsService.js')
-rw-r--r--src/services/conversationsService.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/services/conversationsService.js b/src/services/conversationsService.js
index f05c85fc7..3845cb8c3 100644
--- a/src/services/conversationsService.js
+++ b/src/services/conversationsService.js
@@ -390,6 +390,18 @@ const setCallPermissions = async (token, permissions) => {
})
}
+/**
+ * Set the message expiration
+ *
+ * @param {string} token conversation token
+ * @param {number} seconds the seconds for the message expiration, 0 to disable
+ */
+const setMessageExpiration = async (token, seconds) => {
+ return await axios.post(generateOcsUrl('apps/spreed/api/v4/room/{token}/message-expiration', { token }), {
+ seconds,
+ })
+}
+
const validatePassword = async (password) => {
return await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), {
password,
@@ -422,5 +434,6 @@ export {
clearConversationHistory,
setConversationPermissions,
setCallPermissions,
+ setMessageExpiration,
validatePassword,
}