🐛 Bug fixes of Video/Audio Call
This commit is contained in:
parent
eaf074609e
commit
476466f8c6
@ -137,7 +137,12 @@ func exchangeCallToken(c *fiber.Ctx) error {
|
|||||||
return c.JSON(fiber.Map{
|
return c.JSON(fiber.Map{
|
||||||
"token": tk,
|
"token": tk,
|
||||||
"endpoint": viper.GetString("meeting.endpoint"),
|
"endpoint": viper.GetString("meeting.endpoint"),
|
||||||
"full_url": fmt.Sprintf("%s?jwt=%s", viper.GetString("meeting.endpoint"), url.QueryEscape(tk)),
|
"full_url": fmt.Sprintf(
|
||||||
|
"%s/%s?jwt=%s",
|
||||||
|
viper.GetString("meeting.endpoint"),
|
||||||
|
call.ExternalID,
|
||||||
|
url.QueryEscape(tk),
|
||||||
|
),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ func NewServer() {
|
|||||||
channels.Get("/:channel/calls", listCall)
|
channels.Get("/:channel/calls", listCall)
|
||||||
channels.Get("/:channel/calls/ongoing", getOngoingCall)
|
channels.Get("/:channel/calls/ongoing", getOngoingCall)
|
||||||
channels.Post("/:channel/calls", authMiddleware, startCall)
|
channels.Post("/:channel/calls", authMiddleware, startCall)
|
||||||
channels.Delete("/:channel/calls", authMiddleware, endCall)
|
channels.Delete("/:channel/calls/ongoing", authMiddleware, endCall)
|
||||||
channels.Post("/:channel/calls/ongoing/token", authMiddleware, exchangeCallToken)
|
channels.Post("/:channel/calls/ongoing/token", authMiddleware, exchangeCallToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,8 @@ func EndCall(call models.Call) (models.Call, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func EncodeCallToken(call models.Call, user models.Account) (string, error) {
|
func EncodeCallToken(call models.Call, user models.Account) (string, error) {
|
||||||
tk := jwt.NewWithClaims(jwt.SigningMethodHS512, jwt.MapClaims{
|
// Jitsi requires HS256 as algorithm, so we cannot use HS512
|
||||||
|
tk := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
|
||||||
"context": jwt.MapClaims{
|
"context": jwt.MapClaims{
|
||||||
"user": jwt.MapClaims{
|
"user": jwt.MapClaims{
|
||||||
"avatar": user.Avatar,
|
"avatar": user.Avatar,
|
||||||
|
@ -4,7 +4,7 @@ maintainer = "SmartSheep Studio"
|
|||||||
frontend = "https://lian.solsynth.dev"
|
frontend = "https://lian.solsynth.dev"
|
||||||
|
|
||||||
bind = "0.0.0.0:8447"
|
bind = "0.0.0.0:8447"
|
||||||
domain = "feed.smartsheep.studio"
|
domain = "im.solsynth.dev"
|
||||||
secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
secret = "LtTjzAGFLshwXhN4ZD4nG5KlMv1MWcsvfv03TSZYnT1VhiAnLIZFTnHUwR0XhGgi"
|
||||||
|
|
||||||
content = "uploads"
|
content = "uploads"
|
||||||
@ -20,7 +20,7 @@ endpoint = "https://id.solsynth.dev"
|
|||||||
grpc_endpoint = "id.solsynth.dev:7444"
|
grpc_endpoint = "id.solsynth.dev:7444"
|
||||||
|
|
||||||
[meeting]
|
[meeting]
|
||||||
client_id = "solarmeet"
|
client_id = "solsynth-meeting"
|
||||||
client_secret = "1234567890"
|
client_secret = "1234567890"
|
||||||
endpoint = "https://meet.solsynth.dev"
|
endpoint = "https://meet.solsynth.dev"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user