Commit e76e68ed by HanSon Committed by GitHub

Merge pull request #6 from HanSon/dev

修复撤回历史消息报错
2 parents 02b65c4e 7a35374b
......@@ -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!