From a8c860474530eb93459ec56321ad88b08cb03ec9 Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Wed, 13 Jul 2022 11:35:35 +0200 Subject: [PATCH] fix: DismissLatestContactRequestForContact - set default request id Issue #6395 --- protocol/messenger_contacts.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol/messenger_contacts.go b/protocol/messenger_contacts.go index cab3069a7..1eed11cf7 100644 --- a/protocol/messenger_contacts.go +++ b/protocol/messenger_contacts.go @@ -857,6 +857,10 @@ func (m *Messenger) DismissLatestContactRequestForContact(ctx context.Context, r return nil, err } + if contactRequestID == "" { + contactRequestID = defaultContactRequestID(request.ID.String()) + } + return m.DismissContactRequest(ctx, &requests.DismissContactRequest{ID: types.Hex2Bytes(contactRequestID)}) }