Skip to content

Node.js based forum software built for the modern web

24.7 KB
Raw Blame
get:
  tags:
    - users
  summary: Get chat room
  parameters:
    - name: userslug
      in: path
      required: true
      schema:
        type: string
      example: admin
    - name: roomid
      in: path
      required: true
      schema:
        type: string
      example: 1
    - name: index
      in: path
      required: true
      schema:
        type: string
      example: 1
  responses:
    "200":
      description: ""
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  roomId:
                    type: number
                  roomName:
                    type: string
                  public:
                    type: boolean
                  userCount:
                    type: number
                  messageCount:
                    type: number
                  scrollToIndex:
                    type: number
                    nullable: true
                  icon:
                    type: string
                  groups:
                    type: array
                  timestamp:
                    type: number
                    description: Timestamp of when room was created
                  notificationSetting:
                    type: number
                  notificationOptions:
                    type: array
                  notificationOptionsIcon:
                    type: string
                  joinLeaveMessages:
                    type: number
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        content:
                          type: string
                        timestamp:
                          type: number
                        fromuid:
                          type: number
                        roomId:
                          type: string
                        deleted:
                          type: number
                        system:
                          type: number
                        edited:
                          type: number
                        timestampISO:
                          type: string
                          description: An ISO 8601 formatted date string (complementing `timestamp`)
                        editedISO:
                          type: string
                        mid:
                          type: number
                        messageId:
                          type: number
                        fromUser:
                          type: object
                          properties:
                            uid:
                              type: number
                              description: A user identifier
                            isLocal:
                              type: boolean
                              description: Whether the user belongs to the local installation or not.
                            username:
                              type: string
                              description: A friendly name for a given user account
                            displayname:
                              type: string
                              description: This is either username or fullname depending on forum and user settings
                            userslug:
                              type: string
                              description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                removed, etc.)
                            picture:
                              type: string
                              nullable: true
                            status:
                              type: string
                            banned:
                              type: boolean
                            icon:text:
                              type: string
                              description: A single-letter representation of a username. This is used in the
                                auto-generated icon given to users without
                                an avatar
                            icon:bgColor:
                              type: string
                              description: A six-character hexadecimal colour code assigned to the user. This
                                value is used in conjunction with
                                `icon:text` for the user's auto-generated
                                icon
                              example: "#f44336"
                            banned_until:
                              type: number
                            banned_until_readable:
                              type: string
                            deleted:
                              type: boolean
                        self:
                          type: number
                        newSet:
                          type: boolean
                        index:
                          type: number
                        isOwner:
                          type: boolean
                  isOwner:
                    type: boolean
                  users:
                    type: array
                    items:
                      type: object
                      properties:
                        uid:
                          type: number
                          description: A user identifier
                        isLocal:
                          type: boolean
                          description: Whether the user belongs to the local installation or not.
                        username:
                          type: string
                          description: A friendly name for a given user account
                        displayname:
                          type: string
                          description: This is either username or fullname depending on forum and user settings
                        picture:
                          type: string
                          nullable: true
                        status:
                          type: string
                        online:
                          type: boolean
                        icon:text:
                          type: string
                          description: A single-letter representation of a username. This is used in the
                            auto-generated icon given to users without an
                            avatar
                        icon:bgColor:
                          type: string
                          description: A six-character hexadecimal colour code assigned to the user. This
                            value is used in conjunction with `icon:text`
                            for the user's auto-generated icon
                          example: "#f44336"
                        isOwner:
                          type: boolean
                        index:
                          type: number
                  canReply:
                    type: boolean
                  canUpload:
                    type: boolean
                  groupChat:
                    type: boolean
                  usernames:
                    type: string
                  maximumUsersInChatRoom:
                    type: number
                  maximumChatMessageLength:
                    type: number
                  showUserInput:
                    type: boolean
                  isAdminOrGlobalMod:
                    type: boolean
                  isAdmin:
                    type: boolean
                  rooms:
                    type: array
                    items:
                      type: object
                      properties:
                        roomId:
                          type: number
                        roomName:
                          type: string
                        public:
                          type: boolean
                        userCount:
                          type: number
                        messageCount:
                          type: number
                        groups:
                          type: array
                        timestamp:
                          type: number
                          description: Timestamp of when room was created
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              uid:
                                type: number
                                description: A user identifier
                              isLocal:
                                type: boolean
                                description: Whether the user belongs to the local installation or not.
                              username:
                                type: string
                                description: A friendly name for a given user account
                              displayname:
                                type: string
                                description: This is either username or fullname depending on forum and user settings
                              userslug:
                                type: string
                                description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                  removed, etc.)
                              picture:
                                nullable: true
                                type: string
                              status:
                                type: string
                              lastonline:
                                type: number
                              icon:text:
                                type: string
                                description: A single-letter representation of a username. This is used in the
                                  auto-generated icon given to users without
                                  an avatar
                              icon:bgColor:
                                type: string
                                description: A six-character hexadecimal colour code assigned to the user. This
                                  value is used in conjunction with
                                  `icon:text` for the user's auto-generated
                                  icon
                                example: "#f44336"
                              lastonlineISO:
                                type: string
                        groupChat:
                          type: boolean
                        unread:
                          type: boolean
                        teaser:
                          type: object
                          properties:
                            roomId:
                              type: number
                            fromuid:
                              type: number
                            content:
                              type: string
                            timestamp:
                              type: number
                            timestampISO:
                              type: string
                              description: An ISO 8601 formatted date string (complementing `timestamp`)
                            user:
                              type: object
                              properties:
                                uid:
                                  type: number
                                  description: A user identifier
                                isLocal:
                                  type: boolean
                                  description: Whether the user belongs to the local installation or not.
                                username:
                                  type: string
                                  description: A friendly name for a given user account
                                displayname:
                                  type: string
                                  description: This is either username or fullname depending on forum and user settings
                                userslug:
                                  type: string
                                  description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                    removed, etc.)
                                picture:
                                  nullable: true
                                  type: string
                                status:
                                  type: string
                                lastonline:
                                  type: number
                                icon:text:
                                  type: string
                                  description: A single-letter representation of a username. This is used in the
                                    auto-generated icon given to users
                                    without an avatar
                                icon:bgColor:
                                  type: string
                                  description: A six-character hexadecimal colour code assigned to the user. This
                                    value is used in conjunction with
                                    `icon:text` for the user's
                                    auto-generated icon
                                  example: "#f44336"
                                lastonlineISO:
                                  type: string
                          nullable: true
                        lastUser:
                          type: object
                          properties:
                            uid:
                              type: number
                              description: A user identifier
                            isLocal:
                              type: boolean
                              description: Whether the user belongs to the local installation or not.
                            username:
                              type: string
                              description: A friendly name for a given user account
                            displayname:
                              type: string
                              description: This is either username or fullname depending on forum and user settings
                            userslug:
                              type: string
                              description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                removed, etc.)
                            picture:
                              nullable: true
                              type: string
                            status:
                              type: string
                            lastonline:
                              type: number
                            icon:text:
                              type: string
                              description: A single-letter representation of a username. This is used in the
                                auto-generated icon given to users without
                                an avatar
                            icon:bgColor:
                              type: string
                              description: A six-character hexadecimal colour code assigned to the user. This
                                value is used in conjunction with
                                `icon:text` for the user's auto-generated
                                icon
                              example: "#f44336"
                            lastonlineISO:
                              type: string
                        usernames:
                          type: string
                        chatWithMessage:
                          type: string
                        notificationSetting:
                          type: number
                        joinLeaveMessages:
                          type: number
                  publicRooms:
                    type: array
                    items:
                      type: object
                      properties:
                        owner:
                          oneOf:
                            - type: number
                            - type: string
                        roomId:
                          type: number
                        roomName:
                          type: string
                        public:
                          type: boolean
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              uid:
                                type: number
                                description: A user identifier
                              isLocal:
                                type: boolean
                                description: Whether the user belongs to the local installation or not.
                              username:
                                type: string
                                description: A friendly name for a given user account
                              displayname:
                                type: string
                                description: This is either username or fullname depending on forum and user settings
                              userslug:
                                type: string
                                description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                  removed, etc.)
                              picture:
                                nullable: true
                                type: string
                              status:
                                type: string
                              lastonline:
                                type: number
                              icon:text:
                                type: string
                                description: A single-letter representation of a username. This is used in the
                                  auto-generated icon given to users without
                                  an avatar
                              icon:bgColor:
                                type: string
                                description: A six-character hexadecimal colour code assigned to the user. This
                                  value is used in conjunction with
                                  `icon:text` for the user's auto-generated
                                  icon
                                example: "#f44336"
                              lastonlineISO:
                                type: string
                        groupChat:
                          type: boolean
                        unread:
                          type: boolean
                        teaser:
                          type: object
                          properties:
                            fromuid:
                              type: number
                            content:
                              type: string
                            timestamp:
                              type: number
                            timestampISO:
                              type: string
                              description: An ISO 8601 formatted date string (complementing `timestamp`)
                            user:
                              type: object
                              properties:
                                uid:
                                  type: number
                                  description: A user identifier
                                isLocal:
                                  type: boolean
                                  description: Whether the user belongs to the local installation or not.
                                username:
                                  type: string
                                  description: A friendly name for a given user account
                                displayname:
                                  type: string
                                  description: This is either username or fullname depending on forum and user settings
                                userslug:
                                  type: string
                                  description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                    removed, etc.)
                                picture:
                                  nullable: true
                                  type: string
                                status:
                                  type: string
                                lastonline:
                                  type: number
                                icon:text:
                                  type: string
                                  description: A single-letter representation of a username. This is used in the
                                    auto-generated icon given to users
                                    without an avatar
                                icon:bgColor:
                                  type: string
                                  description: A six-character hexadecimal colour code assigned to the user. This
                                    value is used in conjunction with
                                    `icon:text` for the user's
                                    auto-generated icon
                                  example: "#f44336"
                                lastonlineISO:
                                  type: string
                          nullable: true
                        lastUser:
                          type: object
                          properties:
                            uid:
                              type: number
                              description: A user identifier
                            isLocal:
                              type: boolean
                              description: Whether the user belongs to the local installation or not.
                            username:
                              type: string
                              description: A friendly name for a given user account
                            displayname:
                              type: string
                              description: This is either username or fullname depending on forum and user settings
                            userslug:
                              type: string
                              description: An URL-safe variant of the username (i.e. lower-cased, spaces
                                removed, etc.)
                            picture:
                              nullable: true
                              type: string
                            status:
                              type: string
                            lastonline:
                              type: number
                            icon:text:
                              type: string
                              description: A single-letter representation of a username. This is used in the
                                auto-generated icon given to users without
                                an avatar
                            icon:bgColor:
                              type: string
                              description: A six-character hexadecimal colour code assigned to the user. This
                                value is used in conjunction with
                                `icon:text` for the user's auto-generated
                                icon
                              example: "#f44336"
                            lastonlineISO:
                              type: string
                        usernames:
                          type: string
                        chatWithMessage:
                          type: string
                  privateRoomCount:
                    type: number
                  nextStart:
                    type: number
                  title:
                    type: string
                  uid:
                    type: number
                    description: A user identifier
                  userslug:
                    type: string
                    description: An URL-safe variant of the username (i.e. lower-cased, spaces
                      removed, etc.)
                  canViewInfo:
                    type: boolean
                  chatWithMessage:
                    type: string
                  bodyClasses:
                    type: array
                  composerActions:
                    type: array
                    description: A list of buttons that are added next to the send message button by plugins
              - $ref: ../../../../components/schemas/CommonProps.yaml#/CommonProps