Adrià Vilanova MartÃnez | 4fb615f | 2023-02-04 18:55:16 +0100 | [diff] [blame] | 1 | const 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 | |
| 16 | export default createMessageRemoveParentRef; |