@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
14 lines (12 loc) • 378 B
text/typescript
import { pushToCache } from '~/cache/api';
import { shallowClone } from '~/utils/shallowClone';
export function updateChannelCache(
channel: Amity.StaticInternalChannel,
params: Partial<Amity.StaticInternalChannel>,
) {
pushToCache(
['channel', 'get', channel.channelId],
// eslint-disable-next-line prefer-object-spread
shallowClone(channel, params),
);
}