@@ -33,14 +33,6 @@ type MessageHandler interface {
33
33
// allowed to be sent and persisted
34
34
Validate (ctx context.Context , rendezvous * common.Account , message * messagingpb.Message ) error
35
35
36
- // RequiresActiveStream determines whether a message can only be sent if an
37
- // active stream is available. If true, then the message must also provide
38
- // the maximum time it expects the stream to be valid for, which is dependent
39
- // on the use case.
40
- //
41
- // todo: Not implemented for multi-server
42
- RequiresActiveStream () (bool , time.Duration )
43
-
44
36
// OnSuccess is called upon creating the message after validation
45
37
OnSuccess (ctx context.Context ) error
46
38
}
@@ -80,10 +72,6 @@ func (h *RequestToGrabBillMessageHandler) Validate(ctx context.Context, rendezvo
80
72
return nil
81
73
}
82
74
83
- func (h * RequestToGrabBillMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
84
- return true , time .Minute
85
- }
86
-
87
75
func (h * RequestToGrabBillMessageHandler ) OnSuccess (ctx context.Context ) error {
88
76
return nil
89
77
}
@@ -399,10 +387,6 @@ func (h *RequestToReceiveBillMessageHandler) Validate(ctx context.Context, rende
399
387
return nil
400
388
}
401
389
402
- func (h * RequestToReceiveBillMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
403
- return false , 0 * time .Minute
404
- }
405
-
406
390
func (h * RequestToReceiveBillMessageHandler ) OnSuccess (ctx context.Context ) error {
407
391
if h .recordAlreadyExists {
408
392
return nil
@@ -458,10 +442,6 @@ func (h *ClientRejectedPaymentMessageHandler) Validate(ctx context.Context, rend
458
442
return nil
459
443
}
460
444
461
- func (h * ClientRejectedPaymentMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
462
- return false , 0 * time .Minute
463
- }
464
-
465
445
func (h * ClientRejectedPaymentMessageHandler ) OnSuccess (ctx context.Context ) error {
466
446
return nil
467
447
}
@@ -482,10 +462,6 @@ func (h *CodeScannedMessageHandler) Validate(ctx context.Context, rendezvous *co
482
462
return nil
483
463
}
484
464
485
- func (h * CodeScannedMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
486
- return false , 0 * time .Minute
487
- }
488
-
489
465
func (h * CodeScannedMessageHandler ) OnSuccess (ctx context.Context ) error {
490
466
return nil
491
467
}
0 commit comments