From b82928e820468559a6bb4e9cb345af82d5df08c4 Mon Sep 17 00:00:00 2001 From: arzumify Date: Wed, 8 Jan 2025 16:42:05 +0000 Subject: [PATCH] ISM rewrite part 7 --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ececaf8..2635262 100644 --- a/main.go +++ b/main.go @@ -170,10 +170,12 @@ func (s *ServiceInitializationInformation) SendISMessage(forService uuid.UUID, m return id } -func (s *InterServiceMessage) Respond(messageType MessageCode, message any) { +func (s *InterServiceMessage) Respond(messageType MessageCode, message any, information ServiceInitializationInformation) { s.ServiceID, s.ForServiceID = s.ForServiceID, s.ServiceID s.MessageType = messageType s.Message = message + s.SentAt = time.Now() + information.Outbox <- *s } func (s *ServiceInitializationInformation) SendAndAwaitISMessage(forService uuid.UUID, messageType MessageCode, message any, timeout time.Duration) (InterServiceMessage, error) {