Skip to content

Commit

Permalink
verificationhelper: add better logging when sending cancellation due …
Browse files Browse the repository at this point in the history
…to unknown transaction ID

Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Oct 29, 2024
1 parent 7066beb commit 2a20aa3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto/verificationhelper/verificationhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 2a20aa3

Please sign in to comment.