blob: 5fa59b5eca416b0edd1c4750ece5625ea782c4c2 [file] [log] [blame]
import { Modifier } from "./types";
const createMessageRemoveParentRef: Modifier = {
urlRegex: /api\/CreateMessage/i,
featureGated: true,
features: ['flattenthreads', 'flattenthreads_switch_enabled'],
isEnabled(options) {
return options['flattenthreads'] &&
options['flattenthreads_switch_enabled'];
},
async interceptor(response) {
// Remove parent_message_id value (field 37)
delete response[37];
return response;
}
};
export default createMessageRemoveParentRef;