mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-22 16:47:13 +00:00
14 lines
280 B
Go
14 lines
280 B
Go
package kinds
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"golang.org/x/net/websocket"
|
|
)
|
|
|
|
func SendNotice(ws *websocket.Conn, pubKey, message string) {
|
|
notice := []interface{}{"NOTICE", pubKey, message}
|
|
noticeBytes, _ := json.Marshal(notice)
|
|
websocket.Message.Send(ws, string(noticeBytes))
|
|
}
|