From 653bbd36deb6aed770b8a8b6f30d6d1d11717359 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 5 Apr 2021 19:24:37 +0300 Subject: [PATCH] Log data when sending bridge state to asmux --- asmux.go | 2 ++ puppet.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/asmux.go b/asmux.go index 45e39da..b1decde 100644 --- a/asmux.go +++ b/asmux.go @@ -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 } diff --git a/puppet.go b/puppet.go index 437f4f4..7e68d30 100644 --- a/puppet.go +++ b/puppet.go @@ -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 {