Diff

mod_rest/res/openapi.yaml @ 4935:a85efae90e21

mod_rest: Expand mapping of XEP-0045 join stanza The previous 'join' mapping was apparently lost in translation when swithing to datamapper, so might as well map some properties allowing history control. Usually you probably want either zero history or history since the last known time of being joined. Maybe that the former should be the default?
author Kim Alvefur <zash@zash.se>
date Sat, 30 Apr 2022 01:00:01 +0200
parent 4929:65438e4ba563
child 4948:2ff1fa824c5d
line wrap: on
line diff
--- a/mod_rest/res/openapi.yaml	Tue Apr 26 22:42:09 2022 +0200
+++ b/mod_rest/res/openapi.yaml	Sat Apr 30 01:00:01 2022 +0200
@@ -283,8 +283,8 @@
         idle_since:
           $ref: '#/components/schemas/idle_since'
 
-        join:
-          $ref: '#/components/schemas/join'
+        muc:
+          $ref: '#/components/schemas/muc'
 
         error:
           $ref: '#/components/schemas/error'
@@ -510,11 +510,37 @@
         namespace: urn:xmpp:message-correct:0
         x_single_attribute: id
 
-    join:
-      description: For joining Multi-User-Chats
-      type: boolean
-      enum:
-      - true
+    muc:
+      description: Multi-User-Chat related
+      type: object
+      xml:
+        name: x
+        namespace: http://jabber.org/protocol/muc
+      properties:
+        history:
+          type: object
+          properties:
+            maxchars:
+              type: integer
+              minimum: 0
+              xml:
+                attribute: true
+            maxstanzas:
+              type: integer
+              minimum: 0
+              xml:
+                attribute: true
+            seconds:
+              type: integer
+              minimum: 0
+              xml:
+                attribute: true
+            since:
+              type: string
+              format: date-time
+              xml:
+                attribute: true
+
 
     invite:
       type: object