stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
40 lines • 1.57 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mapStorableToDraftMessage = void 0;
var mapStorableToDraftMessage = draftMessageRow => {
var id = draftMessageRow.id,
custom = draftMessageRow.custom,
text = draftMessageRow.text,
attachments = draftMessageRow.attachments,
mentionedChannel = draftMessageRow.mentionedChannel,
mentionedGroupIds = draftMessageRow.mentionedGroupIds,
mentionedHere = draftMessageRow.mentionedHere,
mentionedRoles = draftMessageRow.mentionedRoles,
mentionedUsers = draftMessageRow.mentionedUsers,
parentId = draftMessageRow.parentId,
poll_id = draftMessageRow.poll_id,
quotedMessageId = draftMessageRow.quotedMessageId,
showInChannel = draftMessageRow.showInChannel,
silent = draftMessageRow.silent,
type = draftMessageRow.type;
return {
attachments: attachments ? JSON.parse(attachments) : undefined,
custom: custom ? JSON.parse(custom) : undefined,
id,
mentioned_channel: mentionedChannel,
mentioned_group_ids: mentionedGroupIds ? JSON.parse(mentionedGroupIds) : undefined,
mentioned_here: mentionedHere,
mentioned_roles: mentionedRoles ? JSON.parse(mentionedRoles) : undefined,
mentioned_users: mentionedUsers ? JSON.parse(mentionedUsers) : undefined,
parent_id: parentId,
poll_id,
quoted_message_id: quotedMessageId,
show_in_channel: showInChannel,
silent,
text,
type
};
};
exports.mapStorableToDraftMessage = mapStorableToDraftMessage;
//# sourceMappingURL=mapStorableToDraftMessage.js.map