瀏覽代碼

调整接口

solupro 5 年之前
父節點
當前提交
4c3f6b9a95
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 4 0
      protected/controllers/GroupController.php
  2. 1 1
      protected/models/Session.php

+ 4 - 0
protected/controllers/GroupController.php

@@ -500,6 +500,10 @@ class GroupController extends BaseController {
         $group_id = (int) $args['group_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);
 
         $objUserGroup = new UserGroup();

+ 1 - 1
protected/models/Session.php

@@ -428,7 +428,7 @@ class Session extends Model {
             // 特殊处理红包
             if ($msg_type == self::MSG_TYPE_REDPACK) {
                 $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 {
                 $text = Utils::decodeRC4($msg);
             }