-
Notifications
You must be signed in to change notification settings - Fork 332
FS-1059 Change commit-bundle body type to protobuf format #2773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d2aa205
018e934
dfab6aa
3dc9279
dbbdf03
3dc4f5a
c258812
1c20fd6
d460c64
41a561a
effe593
22f679e
7c352bf
dbd2488
1002a84
247a83b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Change mime type of body of /v3/mls/commit-bundles endpoint |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| -- This file is part of the Wire Server implementation. | ||
| -- | ||
| -- Copyright (C) 2022 Wire Swiss GmbH <opensource@wire.com> | ||
| -- | ||
| -- This program is free software: you can redistribute it and/or modify it under | ||
| -- the terms of the GNU Affero General Public License as published by the Free | ||
| -- Software Foundation, either version 3 of the License, or (at your option) any | ||
| -- later version. | ||
| -- | ||
| -- This program is distributed in the hope that it will be useful, but WITHOUT | ||
| -- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| -- FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | ||
| -- details. | ||
| -- | ||
| -- You should have received a copy of the GNU Affero General Public License along | ||
| -- with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| module Wire.API.ConverProtoLens where | ||
|
|
||
| import Data.Bifunctor (Bifunctor (first)) | ||
| import Imports | ||
|
|
||
| -- | This typeclass exists to provide overloaded function names for convertion | ||
| -- between data types generated by proto-lens and data types used in wire | ||
| -- We added fundeps here for better type inference, but we can't be as explicit as we wanted | ||
| -- with @a -> b, b -> a@, since our instances would be orphaned on the left hand side argument. | ||
| class ConvertProtoLens a b | b -> a where | ||
| fromProtolens :: a -> Either Text b | ||
| toProtolens :: b -> a | ||
|
|
||
| -- | Add labels to error messages | ||
| protoLabel :: Text -> Either Text a -> Either Text a | ||
| protoLabel lbl = first ((lbl <> ": ") <>) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ tests = | |
| testCase "key package ref" testKeyPackageRef, | ||
| testCase "validate message signature" testVerifyMLSPlainTextWithKey, | ||
| testCase "create signed remove proposal" testRemoveProposalMessageSignature, | ||
| testCase "parse GroupInfoBundle" testParseGroupInfoBundle | ||
| testCase "parse GroupInfoBundle" testParseGroupInfoBundle -- TODO: remove this also | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leftover TODO?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since @smatting is not here to clarify, I'm unsure whether to make this |
||
| ] | ||
|
|
||
| testParseKeyPackage :: IO () | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use
ProtofromWire.API.ServantProtohere, instead.