@textile/hub > Users > readInboxMessage
Users.readInboxMessage() method
Mark a message as read
Signature:
readInboxMessage(id: string): Promise<{
readAt: number;
}>;
Parameters
Parameter | Type | Description |
---|---|---|
id | string |
Returns:
Promise<{ readAt: number; }>
Example
import { Users } from "@textile/hub"
async function example(users: Users) {
const res = await users.listInboxMessages({
limit: 1,
ascending: true,
})
if (res.length === 1) users.readInboxMessage(res[0].id)
}