Include whatsapp user ID in provisioning API ping response

This commit is contained in:
Tulir Asokan 2020-05-28 20:59:36 +03:00
parent c72610f3f0
commit e2261b80b6

View file

@ -26,8 +26,9 @@ import (
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
log "maunium.net/go/maulogger/v2" log "maunium.net/go/maulogger/v2"
whatsappExt "maunium.net/go/mautrix-whatsapp/whatsapp-ext"
"maunium.net/go/mautrix/id" "maunium.net/go/mautrix/id"
whatsappExt "maunium.net/go/mautrix-whatsapp/whatsapp-ext"
) )
type ProvisioningAPI struct { type ProvisioningAPI struct {
@ -236,6 +237,7 @@ func (prov *ProvisioningAPI) Ping(w http.ResponseWriter, r *http.Request) {
wa := map[string]interface{}{ wa := map[string]interface{}{
"has_session": user.Session != nil, "has_session": user.Session != nil,
"management_room": user.ManagementRoom, "management_room": user.ManagementRoom,
"jid": user.JID,
"conn": nil, "conn": nil,
"ping": nil, "ping": nil,
} }