dever 6 years ago
parent
commit
3c0235c9a7
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/Push.php

+ 5 - 1
lib/Push.php

@@ -111,8 +111,12 @@ class Push
    	{
    	{
    		$result = array();
    		$result = array();
    		$info = Dever::db('passport/app')->one(array('uid' => $account));
    		$info = Dever::db('passport/app')->one(array('uid' => $account));
+   		if (!$info) {
+   			$info = Dever::db('passport/user')->one(array('id' => $account));
+   		}
+   		
    		//$info['source_type'] = 'ios';
    		//$info['source_type'] = 'ios';
-   		if ($info && $info['source_type']) {
+   		if ($info && $info['source_type'] && ($info['source_type'] == 'ios' || $info['source_type'] == 'android')) {
    			$result = $this->sendAction($info['source_type'], 2, $this->prefix . $account, $name, $content, $param);
    			$result = $this->sendAction($info['source_type'], 2, $this->prefix . $account, $name, $content, $param);
    		} else {
    		} else {
    			$result = '没有账户信息';
    			$result = '没有账户信息';