mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 Update av
This commit is contained in:
parent
4c7a01a911
commit
2af6113515
2 changed files with 9 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ package api
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
|
|
@ -75,7 +76,14 @@ func performTransactions(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func pushTransactions(app, session string, transactions []*model.Transaction) {
|
func pushTransactions(app, session string, transactions []*model.Transaction) {
|
||||||
evt := util.NewCmdResult("transactions", 0, util.PushModeBroadcastExcludeSelf)
|
pushMode := util.PushModeBroadcastExcludeSelf
|
||||||
|
if 0 < len(transactions) && 0 < len(transactions[0].DoOperations) {
|
||||||
|
if strings.Contains(strings.ToLower(transactions[0].DoOperations[0].Action), "attrview") {
|
||||||
|
pushMode = util.PushModeBroadcast
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
evt := util.NewCmdResult("transactions", 0, pushMode)
|
||||||
evt.AppId = app
|
evt.AppId = app
|
||||||
evt.SessionId = session
|
evt.SessionId = session
|
||||||
evt.Data = transactions
|
evt.Data = transactions
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ package model
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/88250/lute/ast"
|
"github.com/88250/lute/ast"
|
||||||
"github.com/88250/lute/parse"
|
"github.com/88250/lute/parse"
|
||||||
"github.com/siyuan-note/logging"
|
"github.com/siyuan-note/logging"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue