Skip to content

Time Out User #183

Open
Open
@manfe

Description

@manfe

@piotr-suwala

I am having issues on how to listen to user being timed out.

BTW: our time out is being set on custom fields, and when updating the custom fields, no events are fired to the streamUpdates

I am trying to listen for user streamUpdates but this is not receiving anything related to this.

useEffect(() => {
    if (!chat?.currentUser) return

    setCurrentUser(chat.currentUser)

    // Subscribe to user updates
    console.debug("Subscribing to user updates")
    const disconnect = chat.currentUser.streamUpdates((user) => {
      console.debug("User updated", user)
      setCurrentUser(user)
    })

    return () => {
      console.debug("Unsubscribing from user updates")
      disconnect()
    }

  }, [chat?.currentUser])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions