Skip to content

Commit 0569f85

Browse files
signaling: add additional debug logs
1 parent 778dab8 commit 0569f85

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/signaling/matrix.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package signaling
1818

1919
import (
20+
"encoding/json"
21+
2022
"github.com/sirupsen/logrus"
2123
"maunium.net/go/mautrix"
2224
"maunium.net/go/mautrix/event"
@@ -133,6 +135,16 @@ func (m *MatrixForConference) sendToDevice(user MatrixRecipient, eventType event
133135
},
134136
}
135137

138+
{
139+
// TODO: Remove this once
140+
serialized, err := json.Marshal(sendRequest)
141+
if err != nil {
142+
logger.WithError(err).Error("Failed to serialize to-device message")
143+
return
144+
}
145+
logger.Debugf("Sending to-device message: %s", string(serialized))
146+
}
147+
136148
if _, err := m.client.SendToDevice(eventType, sendRequest); err != nil {
137149
logger.Errorf("failed to send to-device event: %w", err)
138150
}

0 commit comments

Comments
 (0)