UNPKG

stream-chat-react-native-core

Version:

The official React Native and Expo components for Stream Chat, a service for building chat applications

17 lines (14 loc) 399 B
import { PendingTask } from 'stream-chat'; import type { TableRowJoinedUser } from '../types'; export const mapStorableToTask = (row: TableRowJoinedUser<'pendingTasks'>): PendingTask => { const { channelId, channelType, threadId, id, messageId, type } = row; return { channelId, channelType, id, messageId, payload: JSON.parse(row.payload), threadId, type, }; };