Skip to content

Commit 2d675db

Browse files
committed
Bytes instead of strings
1 parent 72b51f8 commit 2d675db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

distributor/distributor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type Connector struct {
8989
obj dbus.BusObject
9090
}
9191

92-
func (c Connector) Message(token, contents, id string) error {
92+
func (c Connector) Message(token string, contents []byte, id string) error {
9393
return c.obj.Call("org.unifiedpush.Connector1.Message", dbus.FlagNoReplyExpected, token, contents, id).Err
9494
}
9595

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func httpHandle(w http.ResponseWriter, r *http.Request) {
7878
w.WriteHeader(202)
7979
//implement 429 counter
8080

81-
_ = dbus.NewConnector(conn.AppID).Message(conn.AppToken, string(body), "") //TODO errors
81+
_ = dbus.NewConnector(conn.AppID).Message(conn.AppToken, body, "") //TODO errors
8282
utils.Log.Infoln("MESSAGE", conn.AppID, conn.AppToken, "from", r.RemoteAddr)
8383

8484
} else {

0 commit comments

Comments
 (0)