+ if ($target_item['verb'] != Activity::POST) {
+ return;
+ }
+
+ if (!empty($thr_parent['object'])) {
+ $data = json_decode($thr_parent['object'], true);
+ if (!empty($data['reply_to'])) {
+ $addr = $data['reply_to'][0]['mailbox'] . '@' . $data['reply_to'][0]['host'];
+ Logger::info('Use "reply-to" address of the thread parent', ['addr' => $addr]);
+ } elseif (!empty($data['from'])) {
+ $addr = $data['from'][0]['mailbox'] . '@' . $data['from'][0]['host'];
+ Logger::info('Use "from" address of the thread parent', ['addr' => $addr]);
+ }
+ }
+