Skip to content

Commit

Permalink
add webhook url
Browse files Browse the repository at this point in the history
  • Loading branch information
fffilimonov committed Jun 27, 2023
1 parent 539e95b commit 217c188
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cmd/livekit-cli/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ var (
Name: "grant",
Usage: "additional VideoGrant fields. It'll be merged with other arguments (JSON formatted)",
},
&cli.StringFlag{
Name: "webhook-url",
Usage: "webhook-url for notifier",
},
projectFlag,
},
},
Expand All @@ -81,6 +85,7 @@ func createToken(c *cli.Context) error {
room := c.String("room")
metadata := c.String("metadata")
validFor := c.String("valid-for")
webHookURL := c.String("webhook-url")

grant := &auth.VideoGrant{
Room: room,
Expand Down Expand Up @@ -129,6 +134,10 @@ func createToken(c *cli.Context) error {
if metadata != "" {
at.SetMetadata(metadata)
}
if webHookURL != "" {
at.SetWebHookURL(webHookURL)
}

if name == "" {
name = p
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/livekit/livekit-cli

go 1.18

replace github.com/livekit/protocol v1.5.4 => github.com/dTelecom/protocol v1.0.5
replace github.com/livekit/protocol v1.5.4 => github.com/dTelecom/protocol v1.0.11

require (
github.com/ggwhite/go-masker v1.0.9
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ github.com/dTelecom/p2p-realtime-database v1.0.4 h1:ZBifu26tzW517C9riYAsuv3uJAB4
github.com/dTelecom/p2p-realtime-database v1.0.4/go.mod h1:nnWHXzze4dqAF/KcLwGzDQtoiqip1XqxPYkIvWAtx7c=
github.com/dTelecom/protocol v1.0.5 h1:GFtKajaRyO0aCz7XuqC5du+/9h1BTuKKfDCoXNyO1ow=
github.com/dTelecom/protocol v1.0.5/go.mod h1:0RHLm7rpjqZRyW61iiiZ2nVFGXVvloWrWJ88y+e/+24=
github.com/dTelecom/protocol v1.0.11 h1:74Gt9jPc7guYTpiu3qFzW5+UtFHseFLdsdu9eDK2OFU=
github.com/dTelecom/protocol v1.0.11/go.mod h1:0RHLm7rpjqZRyW61iiiZ2nVFGXVvloWrWJ88y+e/+24=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down

0 comments on commit 217c188

Please sign in to comment.