From 2a20aa32323e91b26adc4177233ecefb6ad2c1be Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Mon, 28 Oct 2024 23:04:00 -0600 Subject: [PATCH] verificationhelper: add better logging when sending cancellation due to unknown transaction ID Signed-off-by: Sumner Evans --- crypto/verificationhelper/verificationhelper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crypto/verificationhelper/verificationhelper.go b/crypto/verificationhelper/verificationhelper.go index cbcff887..d3b7d4f5 100644 --- a/crypto/verificationhelper/verificationhelper.go +++ b/crypto/verificationhelper/verificationhelper.go @@ -240,6 +240,7 @@ func (vh *VerificationHelper) Init(ctx context.Context) error { Stringer("sender", evt.Sender). Stringer("room_id", evt.RoomID). Stringer("event_id", evt.ID). + Stringer("event_type", evt.Type). Logger() var transactionID id.VerificationTransactionID @@ -266,8 +267,10 @@ func (vh *VerificationHelper) Init(ctx context.Context) error { return } + log.Warn().Msg("Sending cancellation event for unknown transaction ID") + // We have to create a fake transaction so that the call to - // verificationCancelled works. + // cancelVerificationTxn works. txn = &verificationTransaction{ RoomID: evt.RoomID, TheirUser: evt.Sender,