blob: a12797510373df551e256838c78dcb2f28fdfa9d [file] [log] [blame]
Adrià Vilanova Martínez4fb615f2023-02-04 18:55:16 +01001const createMessageRemoveParentRef = {
2 urlRegex: /api\/CreateMessage/i,
3 featureGated: true,
4 features: ['flattenthreads', 'flattenthreads_switch_enabled'],
5 isEnabled(options) {
6 return options['flattenthreads'] &&
7 options['flattenthreads_switch_enabled'];
8 },
9 async interceptor(_request, response) {
10 // Remove parent_message_id value (field 37)
11 delete response[37];
12 return response;
13 }
14};
15
16export default createMessageRemoveParentRef;