@textile/hub > Users > listInboxMessages
Users.listInboxMessages() method
List the inbox of the local user
Signature:
listInboxMessages(opts?: InboxListOptions): Promise<Array<UserMessage>>;
Parameters
Parameter | Type | Description |
---|---|---|
opts | InboxListOptions |
Returns:
Promise<Array<UserMessage>>
Example
import { Users, Status } from "@textile/hub"
async function example(users: Users) {
return await users.listInboxMessages({
limit: 5,
ascending: true,
status: Status.UNREAD,
})
}