solupro před 5 roky
rodič
revize
4c3f6b9a95

+ 4 - 0
protected/controllers/GroupController.php

@@ -500,6 +500,10 @@ class GroupController extends BaseController {
         $group_id = (int) $args['group_id'];
         $group_id = (int) $args['group_id'];
         $user_id = (int) $args['block_id'];
         $user_id = (int) $args['block_id'];
 
 
+        if ($user_id == TG_BOT_ID) {
+            Response::error(CODE_NO_PERMITION, 'can not block TG_BOT');
+        }
+
         $this->_checkGroupAdmin($group_id);
         $this->_checkGroupAdmin($group_id);
 
 
         $objUserGroup = new UserGroup();
         $objUserGroup = new UserGroup();

+ 1 - 1
protected/models/Session.php

@@ -428,7 +428,7 @@ class Session extends Model {
             // 特殊处理红包
             // 特殊处理红包
             if ($msg_type == self::MSG_TYPE_REDPACK) {
             if ($msg_type == self::MSG_TYPE_REDPACK) {
                 $text = "
                 $text = "
-<a href='https://{$_SERVER['HTTP_HOST']}/s/{$group['group_name']}'>[收到MeeChat红包,请打开MeeChat查看]</a>";
+[收到MeeChat红包,<a href='https://{$_SERVER['HTTP_HOST']}/s/{$group['group_name']}'>请打开MeeChat查看</a>]";
             } else {
             } else {
                 $text = Utils::decodeRC4($msg);
                 $text = Utils::decodeRC4($msg);
             }
             }