stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
24 lines • 752 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mapDraftToStorable = void 0;
var _mapDateTimeToStorable = require("./mapDateTimeToStorable");
var mapDraftToStorable = ({
draft
}) => {
var channel_cid = draft.channel_cid,
created_at = draft.created_at,
parent_id = draft.parent_id,
message = draft.message,
quoted_message = draft.quoted_message;
var createdAt = (0, _mapDateTimeToStorable.mapDateTimeToStorable)(created_at);
return {
cid: channel_cid,
createdAt,
draftMessageId: message.id,
parentId: parent_id,
quotedMessageId: quoted_message == null ? void 0 : quoted_message.id
};
};
exports.mapDraftToStorable = mapDraftToStorable;
//# sourceMappingURL=mapDraftToStorable.js.map