Skip to content

Commit

Permalink
send broadcast body is json
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad2002 committed Dec 4, 2024
1 parent ac22813 commit e431e18
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 18 additions & 0 deletions client/notification_client_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package client

//
//import (
// "fmt"
// "testing"
//)
//
//func TestNotificationClient_SendMeetingBroadcastNotification(t *testing.T) {
// client := NewNotificationClient("http://localhost:8090/")
//
// r, e := client.SendMeetingBroadcastNotification("12345678", "IESC", `"test": {}`)
// if e != nil {
// fmt.Printf(e.Error())
// }
// fmt.Println(r)
// //fmt.Printf("id: %s, number: %d, start: %s", r.Identifier.String(), r.Number, r.StartEstimation.Format("15:04"))
//}
4 changes: 1 addition & 3 deletions service/broadcast_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ func SendPushBroadcast(channel string, content string) (string, string, string,
"aps": {
"timestamp": ` + strconv.Itoa(int(time.Now().Unix())) + `,
"event": "update",
"content-state": {
` + content + `
}
"content-state": ` + content + `
}
}
`)
Expand Down

0 comments on commit e431e18

Please sign in to comment.