Skip to content

Commit

Permalink
Update core.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nkxingxh committed Aug 13, 2022
1 parent 6ff49ff commit e0398cf
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions core.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,19 @@ function sendTempMessage($qq, $group, $messageChain, $quote = 0, $sessionKey = '
*/
function recall($messageId = true, $target = true, $sessionKey = '')
{
if ($messageId === true && webhook) {
if (webhook) {
global $_DATA;
if ($_DATA['type'] == 'GroupMessage') $messageId = $_DATA['messageChain'][0]['id'];
else return false;
} else $messageId = (int) $messageId;
if ($target === true && webhook) {
global $_DATA;
if ($_DATA['type'] == 'GroupMessage') $target = $_DATA['sender']['group']['id'];
else $target = $_DATA['sender']['id'];
} else $target = (int) $target;
if ($messageId === true && webhook) {

if ($_DATA['type'] == 'GroupMessage') $messageId = $_DATA['messageChain'][0]['id'];
else return false;
} else $messageId = (int) $messageId;
if ($target === true && webhook) {
global $_DATA;
if ($_DATA['type'] == 'GroupMessage') $target = $_DATA['sender']['group']['id'];
else $target = $_DATA['sender']['id'];
} else $target = (int) $target;
}
if (empty($messageId) || empty($target)) return false;
return autoAdapter(__FUNCTION__, array('sessionKey' => $sessionKey, 'messageId' => $messageId, 'target' => $target));
}
Expand Down

0 comments on commit e0398cf

Please sign in to comment.