Log data when sending bridge state to asmux

This commit is contained in:
Tulir Asokan 2021-04-05 19:24:37 +03:00
parent 74f09f128c
commit 653bbd36de
2 changed files with 3 additions and 1 deletions

View file

@ -102,6 +102,7 @@ func (user *User) sendBridgeStatus(state AsmuxPong) {
}
cli := user.bridge.AS.BotClient()
url := cli.BuildBaseURL("_matrix", "client", "unstable", "com.beeper.asmux", "pong")
user.log.Debugfln("Sending bridge state to asmux: %+v", state)
_, err := cli.MakeRequest("POST", url, &state, nil)
if err != nil {
user.log.Warnln("Failed to update bridge state in asmux:", err)
@ -148,6 +149,7 @@ func (prov *ProvisioningAPI) AsmuxPing(w http.ResponseWriter, r *http.Request) {
}
}
resp.fill()
user.log.Debugfln("Responding bridge state to asmux: %+v", resp)
jsonResponse(w, http.StatusOK, &resp)
user.prevBridgeStatus = &resp
}

View file

@ -295,7 +295,7 @@ func (puppet *Puppet) SyncContactIfNecessary(source *User) {
contact, ok := source.Conn.Store.Contacts[puppet.JID]
if !ok {
puppet.log.Warnln("No contact info found through %s in SyncContactIfNecessary", source.MXID)
puppet.log.Warnfln("No contact info found through %s in SyncContactIfNecessary", source.MXID)
contact.JID = puppet.JID
// Sync anyway to set a phone number name
} else {