@@ -33,14 +33,6 @@ type MessageHandler interface {
3333 // allowed to be sent and persisted
3434 Validate (ctx context.Context , rendezvous * common.Account , message * messagingpb.Message ) error
3535
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-
4436 // OnSuccess is called upon creating the message after validation
4537 OnSuccess (ctx context.Context ) error
4638}
@@ -80,10 +72,6 @@ func (h *RequestToGrabBillMessageHandler) Validate(ctx context.Context, rendezvo
8072 return nil
8173}
8274
83- func (h * RequestToGrabBillMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
84- return true , time .Minute
85- }
86-
8775func (h * RequestToGrabBillMessageHandler ) OnSuccess (ctx context.Context ) error {
8876 return nil
8977}
@@ -399,10 +387,6 @@ func (h *RequestToReceiveBillMessageHandler) Validate(ctx context.Context, rende
399387 return nil
400388}
401389
402- func (h * RequestToReceiveBillMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
403- return false , 0 * time .Minute
404- }
405-
406390func (h * RequestToReceiveBillMessageHandler ) OnSuccess (ctx context.Context ) error {
407391 if h .recordAlreadyExists {
408392 return nil
@@ -458,10 +442,6 @@ func (h *ClientRejectedPaymentMessageHandler) Validate(ctx context.Context, rend
458442 return nil
459443}
460444
461- func (h * ClientRejectedPaymentMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
462- return false , 0 * time .Minute
463- }
464-
465445func (h * ClientRejectedPaymentMessageHandler ) OnSuccess (ctx context.Context ) error {
466446 return nil
467447}
@@ -482,10 +462,6 @@ func (h *CodeScannedMessageHandler) Validate(ctx context.Context, rendezvous *co
482462 return nil
483463}
484464
485- func (h * CodeScannedMessageHandler ) RequiresActiveStream () (bool , time.Duration ) {
486- return false , 0 * time .Minute
487- }
488-
489465func (h * CodeScannedMessageHandler ) OnSuccess (ctx context.Context ) error {
490466 return nil
491467}
0 commit comments