Commit 7a35374b by HanSon

修复撤回历史消息报错

1 parent 6cab8c20
......@@ -49,10 +49,13 @@ class Recall extends Message implements MessageInterface
$msgId = $this->parseMsgId($this->msg['Content']);
/** @var Message $message */
$this->origin = $message = message()->get($msgId);
$this->nickname = $message->sender ? $message->sender['NickName'] : account()->getAccount($message->msg['FromUserName'])['NickName'];
$this->origin = $message = message()->get($msgId, null);
if(!$message){
$this->nickname = $message->sender ? $message->sender['NickName'] : account()->getAccount($message->msg['FromUserName'])['NickName'];
$this->setContent();
}
$this->setContent();
}
private function setContent()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!