Skip to main content
Version: 1.x.x

Getting Viewing User and Document Members

quip.apps.getViewingUser

Function() => (quip.apps.User | null)

Returns the quip.apps.User object representing the current viewing Quip user. Returns null if the viewer is not logged in to Quip.

quip.apps.isViewerLoggedIn

Function() => boolean

Returns whether or not the viewer is logged in to Quip.

quip.apps.getDocumentMembers

Function() => quip.apps.User[]

Returns an array of quip.apps.User objects representing the Quip users that are members of this thread.

Relevant Events

Example


const listMembers = () => {
const viewingUser = quip.apps.getViewingUser();

const allMembers = quip.apps.getDocumentMembers();

console.log(viewingUser.getName() + " is currently viewing the document");

allMembers.forEach(user => console.log(user.getName() + " is a member of this document"));
}

quip.apps.addEventListener(quip.apps.EventType.DOCUMENT_MEMBERS_LOADED, listMembers);