mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-06-28 06:46:12 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -35,7 +35,7 @@ Below are the detailed changes in this version.
|
||||
### Development
|
||||
|
||||
* [Task lists support the `data-task` status attribute](https://github.com/siyuan-note/siyuan/issues/17343)
|
||||
* [Add `type` parameter to `getAllTabs` plugin](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [Add a `type` parameter to the plugin API `getAllTabs`](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [Add kernel API `/api/file/workspaceCopyFiles`](https://github.com/siyuan-note/siyuan/pull/17421)
|
||||
* [Add kernel API `/api/block/updateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/issues/17451)
|
||||
* [Add kernel API `/api/block/batchUpdateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/pull/17461)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
### 開發者
|
||||
|
||||
* [任務清單支援 `data-task` 狀態屬性](https://github.com/siyuan-note/siyuan/issues/17343)
|
||||
* [為 `getAllTabs` 外掛程式新增 `type` 參數](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [為插件 API `getAllTabs` 新增 `type` 參數](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [新增核心 API `/api/file/workspaceCopyFiles`](https://github.com/siyuan-note/siyuan/pull/17421)
|
||||
* [新增內核 API `/api/block/updateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/issues/17451)
|
||||
* [新增核心 API `/api/block/batchUpdateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/pull/17461)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
### 开发者
|
||||
|
||||
* [任务列表支持 `data-task` 状态属性](https://github.com/siyuan-note/siyuan/issues/17343)
|
||||
* [为 `getAllTabs` 插件添加 `type` 参数](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [为插件 API `getAllTabs` 添加 `type` 参数](https://github.com/siyuan-note/siyuan/issues/17354)
|
||||
* [新增内核 API `/api/file/workspaceCopyFiles`](https://github.com/siyuan-note/siyuan/pull/17421)
|
||||
* [新增内核 API `/api/block/updateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/issues/17451)
|
||||
* [新增内核 API `/api/block/batchUpdateTaskListItemMarker`](https://github.com/siyuan-note/siyuan/pull/17461)
|
||||
|
||||
@@ -17,12 +17,14 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/olahol/melody"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
"github.com/siyuan-note/logging"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -107,11 +109,25 @@ func SessionsByType(typ string) (ret []*melody.Session) {
|
||||
}
|
||||
|
||||
func AddPushChan(session *melody.Session) {
|
||||
appID := session.Request.URL.Query().Get("app")
|
||||
appID := strings.TrimSpace(session.Request.URL.Query().Get("app"))
|
||||
if "" == appID {
|
||||
logging.LogErrorf("app id is required")
|
||||
return
|
||||
}
|
||||
session.Set("app", appID)
|
||||
id := session.Request.URL.Query().Get("id")
|
||||
|
||||
id := strings.TrimSpace(session.Request.URL.Query().Get("id"))
|
||||
if "" == id {
|
||||
logging.LogErrorf("id is required")
|
||||
return
|
||||
}
|
||||
session.Set("id", id)
|
||||
typ := session.Request.URL.Query().Get("type")
|
||||
|
||||
typ := strings.TrimSpace(session.Request.URL.Query().Get("type"))
|
||||
if "" == typ {
|
||||
logging.LogErrorf("type is required")
|
||||
return
|
||||
}
|
||||
session.Set("type", typ)
|
||||
|
||||
if IsAuthSession(session) {
|
||||
|
||||
Reference in New Issue
Block a user