stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
17 lines (13 loc) • 446 B
text/typescript
import { ReminderResponseBase } from 'stream-chat';
import type { TableRow } from '../types';
export const mapStorableToReminder = (row: TableRow<'reminders'>): ReminderResponseBase => {
const { channelCid, createdAt, messageId, remindAt, updatedAt, userId } = row;
return {
channel_cid: channelCid,
created_at: createdAt,
message_id: messageId,
remind_at: remindAt,
updated_at: updatedAt,
user_id: userId,
};
};