From 537ae622d2b33b5de39593fe264368a81a7c3506 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 15 May 2024 23:22:23 +0800 Subject: [PATCH] chore: filter inbox type --- server/router/api/v1/inbox_service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/router/api/v1/inbox_service.go b/server/router/api/v1/inbox_service.go index 31e1e713..d663311e 100644 --- a/server/router/api/v1/inbox_service.go +++ b/server/router/api/v1/inbox_service.go @@ -31,7 +31,11 @@ func (s *APIV1Service) ListInboxes(ctx context.Context, _ *v1pb.ListInboxesReque Inboxes: []*v1pb.Inbox{}, } for _, inbox := range inboxes { - response.Inboxes = append(response.Inboxes, convertInboxFromStore(inbox)) + inboxMessage := convertInboxFromStore(inbox) + if inboxMessage.Type == v1pb.Inbox_TYPE_UNSPECIFIED { + continue + } + response.Inboxes = append(response.Inboxes, inboxMessage) } return response, nil