User Busy Status

Overview#

User can set their busy status upon his preference. When busy status is enabled if any message is received to the user, the busy message is sent automatically to the sender of the message.

Enable/Disable User Busy status#

User can enable and disable their busy status using the below method.

    ChatManager.shared.enableDisableBusyStatus(ENABLE_BUSY_STATUS, completion: @escaping FlyCompletionHandler)
    ArgumentTypeDescription
    ENABLE_BUSY_STATUSBooltrue enables busy status and false disables busy status
    COMPLETIONFlyCompletionHandlerFlyCompletionHandler used as completion Handler

    Set User Busy status#

    User can set the busy status message for their one to one chat conversation using the below method.

      ChatManager.shared.setMyBusyStatus(BUSY_STATUS_TEXT, completion: @escaping FlyCompletionHandler)
      ArgumentTypeDescription
      BUSY_STATUS_TEXTStringbusy status text cannot be longer than 140 characters
      COMPLETIONFlyCompletionHandlerFlyCompletionHandler used as completion Handler

      Get current User busy status#

      User can get their current user busy status using the below method.

        let myBusyStatus: BusyStatus = ChatManager.shared.getMyBusyStatus()

        Refer this doc to know more about BusyStatus Class

        Check User Busy status is enabled#

        User can check whether their busy status is enabled or disabled.

          let isMyBusyStatusEnabled: Bool = ChatManager.shared.isBusyStatusEnabled()
          ChatManager.getUserBusyStatusFromServer()
          info

          While user Logging the app, user busy status will be synced from server by calling the method ChatManager.getUserBusyStatusFromServer() and status will be updated to ChatManager.shared.isBusyStatusEnabled()

          Get the list of User saved busy statuses#

          User can get their list of previously saved user busy statuses by calling the below method.

            let myBusyStatusList: [BusyStatus] = ChatManager.shared.getBusyStatusList()
            info

            This list also contains some pre defined values.

            Delete a user Busy Status#

            User can delete their busy status by calling the below method.

              ChatManager.shared.deleteBusyStatus(statusId: STATUS_ID)
              ArgumentTypeDescription
              STATUS_IDStringObject of the user busy status that has to be deleted
              caution

              User cannot delete a busy status which is currently selected.