stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
13 lines • 561 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getUrlOfImageAttachment = getUrlOfImageAttachment;
var _types = require("../types/types");
function getUrlOfImageAttachment(image, giphyVersion = 'fixed_height') {
if (image.type === _types.FileTypes.Giphy) {
var _image$giphy;
return ((_image$giphy = image.giphy) == null || (_image$giphy = _image$giphy[giphyVersion]) == null ? void 0 : _image$giphy.url) || image.thumb_url;
}
return image.image_url || image.asset_url;
}
//# sourceMappingURL=getUrlOfImageAttachment.js.map