Skip to content
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

feat: add parsing for new links format #3665

Merged
merged 27 commits into from
Jul 4, 2023

Conversation

MishkaRogachev
Copy link
Contributor

@MishkaRogachev MishkaRogachev commented Jun 22, 2023

For status-im/status-desktop#10851

Implement parsing shared urls in a new format

Important changes:

  • Parse url with a community key or community data (/c/ or /c#)
  • Parse url with a community channel (/cc/)
  • Parse url with a contact

@status-github-bot
Copy link

status-github-bot bot commented Jun 22, 2023

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?
  • Have you tested changes with mobile?
  • Have you tested changes with desktop?

@status-im-auto
Copy link
Member

status-im-auto commented Jun 22, 2023

Jenkins Builds

Click to see older builds (121)
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 487ae50 #1 2023-06-22 17:18:42 ~2 min tests 📄log
✔️ 487ae50 #1 2023-06-22 17:18:48 ~2 min linux 📦zip
✔️ 487ae50 #1 2023-06-22 17:19:37 ~3 min ios 📦zip
✔️ 487ae50 #1 2023-06-22 17:20:37 ~4 min android 📦aar
✔️ 2cbcf2a #2 2023-06-23 10:37:38 ~2 min ios 📦zip
✖️ 2cbcf2a #2 2023-06-23 10:37:52 ~2 min tests 📄log
✔️ 2cbcf2a #2 2023-06-23 10:38:03 ~2 min linux 📦zip
✔️ 2cbcf2a #2 2023-06-23 10:39:55 ~4 min android 📦aar
6217aed #3 2023-06-23 10:59:10 ~15 sec linux 📄log
6217aed #3 2023-06-23 10:59:12 ~21 sec android 📄log
6217aed #3 2023-06-23 10:59:15 ~19 sec ios 📄log
✖️ 6217aed #3 2023-06-23 11:01:22 ~2 min tests 📄log
4943f37 #4 2023-06-23 10:59:52 ~17 sec ios 📄log
4943f37 #4 2023-06-23 10:59:55 ~18 sec android 📄log
4943f37 #4 2023-06-23 10:59:55 ~15 sec linux 📄log
✖️ 4943f37 #4 2023-06-23 11:02:22 ~55 sec tests 📄log
62a96b8 #5 2023-06-23 12:19:17 ~15 sec linux 📄log
62a96b8 #5 2023-06-23 12:20:20 ~1 min ios 📄log
62a96b8 #5 2023-06-23 12:20:35 ~1 min android 📄log
✖️ 62a96b8 #5 2023-06-23 12:21:32 ~2 min tests 📄log
1f2188c #6 2023-06-23 14:10:00 ~23 sec linux 📄log
1f2188c #6 2023-06-23 14:10:04 ~27 sec android 📄log
1f2188c #6 2023-06-23 14:10:08 ~30 sec ios 📄log
✖️ 1f2188c #6 2023-06-23 14:10:57 ~1 min tests 📄log
✔️ a41d929 #7 2023-06-27 12:16:42 ~4 min ios 📦zip
✔️ a41d929 #7 2023-06-27 12:17:32 ~5 min linux 📦zip
✖️ a41d929 #7 2023-06-27 12:17:43 ~5 min tests 📄log
✔️ a41d929 #7 2023-06-27 12:20:38 ~8 min android 📦aar
✔️ f8d73bc #8 2023-06-27 16:17:04 ~1 min android 📦aar
✔️ f8d73bc #8 2023-06-27 16:17:51 ~2 min ios 📦zip
✖️ f8d73bc #8 2023-06-27 16:18:03 ~2 min tests 📄log
✔️ f8d73bc #8 2023-06-27 16:19:48 ~4 min linux 📦zip
✖️ 7e0b8ce #9 2023-06-27 17:14:09 ~1 min tests 📄log
✔️ 7e0b8ce #9 2023-06-27 17:14:21 ~1 min linux 📦zip
✔️ 7e0b8ce #9 2023-06-27 17:14:43 ~1 min android 📦aar
✔️ 7e0b8ce #9 2023-06-27 17:15:32 ~2 min ios 📦zip
✔️ ad0d5a2 #10 2023-06-27 19:28:24 ~1 min linux 📦zip
✔️ ad0d5a2 #10 2023-06-27 19:28:27 ~1 min android 📦aar
✖️ ad0d5a2 #10 2023-06-27 19:29:01 ~2 min tests 📄log
✔️ ad0d5a2 #10 2023-06-27 19:29:20 ~2 min ios 📦zip
✖️ 4f4ad50 #11 2023-06-28 08:56:24 ~59 sec tests 📄log
✔️ 4f4ad50 #11 2023-06-28 08:56:55 ~1 min android 📦aar
✔️ 4f4ad50 #11 2023-06-28 08:58:05 ~2 min ios 📦zip
✔️ 4f4ad50 #11 2023-06-28 08:58:24 ~2 min linux 📦zip
✖️ 359b935 #12 2023-06-28 10:43:23 ~57 sec tests 📄log
✔️ 359b935 #12 2023-06-28 10:43:38 ~1 min linux 📦zip
✔️ 359b935 #12 2023-06-28 10:44:01 ~1 min android 📦aar
✔️ 359b935 #12 2023-06-28 10:44:58 ~2 min ios 📦zip
6e795d4 #13 2023-06-28 14:08:10 ~1 min ios 📄log
✖️ 6e795d4 #13 2023-06-28 14:11:52 ~4 min tests 📄log
6e795d4 #13 2023-06-28 14:12:17 ~5 min android 📄log
6e795d4 #13 2023-06-28 14:13:23 ~6 min linux 📄log
be10879 #14 2023-06-28 15:45:32 ~17 sec linux 📄log
be10879 #14 2023-06-28 15:45:38 ~23 sec ios 📄log
be10879 #14 2023-06-28 15:46:33 ~1 min android 📄log
✖️ be10879 #14 2023-06-28 15:46:39 ~1 min tests 📄log
45857ac #15 2023-06-28 16:08:08 ~32 sec ios 📄log
45857ac #15 2023-06-28 16:09:12 ~1 min android 📄log
45857ac #15 2023-06-28 16:09:42 ~2 min linux 📄log
✖️ 45857ac #15 2023-06-28 16:10:07 ~2 min tests 📄log
95af1fb #16 2023-06-29 09:19:33 ~16 sec linux 📄log
95af1fb #16 2023-06-29 09:19:37 ~20 sec ios 📄log
95af1fb #16 2023-06-29 09:19:40 ~22 sec android 📄log
✖️ 95af1fb #16 2023-06-29 09:20:13 ~56 sec tests 📄log
✔️ 08a8fbf #17 2023-06-29 11:13:44 ~1 min linux 📦zip
✖️ 08a8fbf #17 2023-06-29 11:13:46 ~1 min tests 📄log
✔️ 08a8fbf #17 2023-06-29 11:14:17 ~1 min android 📦aar
✔️ 08a8fbf #17 2023-06-29 11:15:04 ~2 min ios 📦zip
✔️ 6e1d0db #18 2023-06-29 11:37:52 ~2 min ios 📦zip
✖️ 6e1d0db #18 2023-06-29 11:43:45 ~8 min tests 📄log
✔️ 6e1d0db #18 2023-06-29 11:44:09 ~8 min android 📦aar
✔️ 6e1d0db #18 2023-06-29 11:44:57 ~9 min linux 📦zip
✖️ 04cce5e #19 2023-06-29 12:18:50 ~1 min tests 📄log
✔️ 04cce5e #19 2023-06-29 12:19:00 ~1 min linux 📦zip
✔️ 04cce5e #19 2023-06-29 12:20:06 ~2 min ios 📦zip
✔️ 04cce5e #19 2023-06-29 12:22:53 ~5 min android 📦aar
✔️ 6ed874c #20 2023-06-29 12:32:19 ~1 min android 📦aar
✔️ 6ed874c #20 2023-06-29 12:32:50 ~2 min ios 📦zip
✔️ 6ed874c #20 2023-06-29 12:32:53 ~2 min linux 📦zip
✖️ 6ed874c #20 2023-06-29 12:32:58 ~2 min tests 📄log
✖️ 5b12a63 #21 2023-06-29 12:47:45 ~1 min tests 📄log
✔️ 5b12a63 #21 2023-06-29 12:48:15 ~1 min android 📦aar
✖️ 5b12a63 #22 2023-06-29 12:48:39 ~48 sec tests 📄log
✔️ 5b12a63 #21 2023-06-29 12:48:52 ~2 min ios 📦zip
✔️ 5b12a63 #22 2023-06-29 12:49:23 ~1 min android 📦aar
✔️ 5b12a63 #21 2023-06-29 12:49:34 ~2 min linux 📦zip
✔️ 5b12a63 #22 2023-06-29 12:50:39 ~59 sec linux 📦zip
✔️ 5b12a63 #22 2023-06-29 12:51:02 ~2 min ios 📦zip
✖️ 5fc7dd1 #23 2023-06-29 13:17:57 ~1 min tests 📄log
✔️ 5fc7dd1 #23 2023-06-29 13:18:02 ~1 min linux 📦zip
✔️ 5fc7dd1 #23 2023-06-29 13:19:13 ~2 min ios 📦zip
✔️ 5fc7dd1 #23 2023-06-29 13:20:36 ~3 min android 📦aar
✔️ 368b05c #24 2023-06-29 13:25:55 ~1 min linux 📦zip
✖️ 368b05c #24 2023-06-29 13:26:08 ~1 min tests 📄log
✔️ 368b05c #24 2023-06-29 13:26:24 ~1 min android 📦aar
✔️ 368b05c #24 2023-06-29 13:27:12 ~2 min ios 📦zip
✖️ 78e5377 #25 2023-06-29 13:28:10 ~1 min tests 📄log
✔️ 78e5377 #25 2023-06-29 13:28:15 ~1 min android 📦aar
✔️ 78e5377 #25 2023-06-29 13:28:26 ~1 min linux 📦zip
✔️ 78e5377 #25 2023-06-29 13:29:27 ~2 min ios 📦zip
✔️ e9594e8 #26 2023-06-29 13:33:52 ~1 min linux 📦zip
✔️ e9594e8 #26 2023-06-29 13:34:11 ~1 min android 📦aar
✔️ e9594e8 #26 2023-06-29 13:34:55 ~2 min ios 📦zip
✖️ e9594e8 #26 2023-06-29 13:36:57 ~4 min tests 📄log
✔️ e9594e8 #27 2023-06-29 14:06:21 ~28 min tests 📄log
✔️ 6a1a5ef #27 2023-06-29 14:12:38 ~1 min linux 📦zip
✔️ 6a1a5ef #27 2023-06-29 14:13:22 ~1 min android 📦aar
✔️ 6a1a5ef #27 2023-06-29 14:13:50 ~2 min ios 📦zip
✔️ 6a1a5ef #28 2023-06-29 14:27:36 ~16 min tests 📄log
✔️ 38388ef #28 2023-06-30 09:58:49 ~2 min ios 📦zip
✔️ 38388ef #28 2023-06-30 10:00:06 ~3 min linux 📦zip
✔️ 38388ef #28 2023-06-30 10:00:36 ~4 min android 📦aar
✔️ 38388ef #29 2023-06-30 10:17:40 ~21 min tests 📄log
✖️ b66f8a6 #30 2023-06-30 18:24:40 ~1 min tests 📄log
✔️ b66f8a6 #29 2023-06-30 18:24:47 ~1 min linux 📦zip
✔️ b66f8a6 #29 2023-06-30 18:25:14 ~1 min android 📦aar
✔️ b66f8a6 #29 2023-06-30 18:25:57 ~2 min ios 📦zip
✖️ ac1b1ff #31 2023-07-03 11:31:37 ~1 min tests 📄log
✔️ ac1b1ff #30 2023-07-03 11:31:45 ~1 min linux 📦zip
✔️ ac1b1ff #30 2023-07-03 11:32:00 ~1 min android 📦aar
✔️ ac1b1ff #30 2023-07-03 11:33:06 ~2 min ios 📦zip
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 419e857 #31 2023-07-03 13:10:38 ~3 min android 📦aar
✔️ 419e857 #31 2023-07-03 13:11:21 ~3 min linux 📦zip
✖️ 419e857 #32 2023-07-03 13:11:41 ~4 min tests 📄log
✔️ d8c2f1f #32 2023-07-03 13:57:15 ~1 min linux 📦zip
✖️ d8c2f1f #33 2023-07-03 13:57:22 ~1 min tests 📄log
✔️ d8c2f1f #32 2023-07-03 13:57:39 ~1 min android 📦aar
✔️ d8c2f1f #32 2023-07-03 13:58:16 ~2 min ios 📦zip
✔️ d8c2f1f #34 2023-07-03 14:20:56 ~13 min tests 📄log

@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch 2 times, most recently from ad0d5a2 to 4f4ad50 Compare June 28, 2023 08:55
@Samyoul
Copy link
Member

Samyoul commented Jun 28, 2023

Ok @MishkaRogachev @borismelnik this actually fixes the functionality and the tests pass.

fix.patch

git apply ./fix.patch

Or I can push this as a commit myself.

diff --git a/protocol/messenger_share_urls_test.go b/protocol/messenger_share_urls_test.go
index 129c6a4f8..54d9a665b 100644
--- a/protocol/messenger_share_urls_test.go
+++ b/protocol/messenger_share_urls_test.go
@@ -112,14 +112,19 @@ func (s *MessengerShareUrlsSuite) createCommunityWithChannel() (*communities.Com
 }
 
 func (s *MessengerShareUrlsSuite) TestDecodeEncodeDataURL() {
-	testData := []byte("test data 123")
+	ts := [][]byte{
+		[]byte("test data 123"),
+		[]byte("test data 123test data 123test data 123test data 123test data 123"),
+	}
 
-	encodedData, err := urls.EncodeDataURL(testData)
-	s.Require().NoError(err)
+	for i := range ts {
+		encodedData, err := urls.EncodeDataURL(ts[i])
+		s.Require().NoError(err)
 
-	decodedData, err := urls.DecodeDataURL(encodedData)
-	s.Require().NoError(err)
-	s.Require().Equal(testData, decodedData)
+		decodedData, err := urls.DecodeDataURL(encodedData)
+		s.Require().NoError(err)
+		s.Require().Equal(ts[i], decodedData)
+	}
 }
 
 func (s *MessengerShareUrlsSuite) TestSerializePublicKey() {
diff --git a/protocol/urls/utils.go b/protocol/urls/utils.go
index 00ba40942..124ad4e6a 100644
--- a/protocol/urls/utils.go
+++ b/protocol/urls/utils.go
@@ -61,7 +61,11 @@ func encodeDataURL(data []byte) (string, error) {
 	bb := bytes.NewBuffer([]byte{})
 	writer := brotli.NewWriter(bb)
 	_, err := writer.Write(data)
-	writer.Close()
+	if err != nil {
+		return "", err
+	}
+
+	err = writer.Close()
 	if err != nil {
 		return "", err
 	}
@@ -71,17 +75,17 @@ func encodeDataURL(data []byte) (string, error) {
 
 func decodeDataURL(data string) ([]byte, error) {
 	decoded, err := base64.URLEncoding.DecodeString(data)
-
 	if err != nil {
 		return nil, err
 	}
-	var output []byte
+
+	output := make([]byte, 4096)
 	bb := bytes.NewBuffer(decoded)
 	reader := brotli.NewReader(bb)
-	_, err = reader.Read(output)
+	n, err := reader.Read(output)
 	if err != nil {
 		return nil, err
 	}
 
-	return output, nil
+	return output[:n], nil
 }

@Samyoul
Copy link
Member

Samyoul commented Jun 28, 2023

Decoding the url data seems to be working fine for me, but I'm getting the following error:

string field contains invalid UTF-8

Detailed output:

{
 00000000  0a 44 0a 07 44 6f 6f 64  6c 65 73 12 27 43 6f 6c  |.D..Doodles.'Col|
 00000010  6f 72 69 6e 67 20 74 68  65 20 77 6f 72 6c 64 20  |oring the world |
 00000020  77 69 74 68 20 6a 6f 79  20 e2 80 a2 20 e1 b4 97  |with joy ... ...|
 00000030  20 e2 80 a2 18 98 a2 1b  22 07 23 31 33 31 44 32  | .......".#131D2|
 00000040  46 2a 03 01 21 33                                 |F*..!3|
}
    messenger_share_urls_test.go:146: 
        	Error Trace:	/Users/samuel/go/src/github.com/Samyoul/status-go/protocol/messenger_share_urls_test.go:146
        	Error:      	Received unexpected error:
        	            	string field contains invalid UTF-8
        	Test:       	TestMessengerShareUrlsSuite/TestDecodeURLData

I've tried to unmarshal this data into the protobuf.Community and protobuf.Channel protobuf structs, and the error seems to give me the impression that the below url is not meant to be marshalled into either of these.

https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#QnO2hw5tVAE-MD5i8Mq4s_oGWd0rRFmlObgRUNQXtUNwP1ixFw914Y4-BQpF08KOqpaULCh7UCtlWR-O0YP8MwA=

Parsed using the following code:

func (s *MessengerShareUrlsSuite) TestDecodeURLData() {
	us := "https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#QnO2hw5tVAE-MD5i8Mq4s_oGWd0rRFmlObgRUNQXtUNwP1ixFw914Y4-BQpF08KOqpaULCh7UCtlWR-O0YP8MwA="

	u, err := url.Parse(us)
	s.Require().NoError(err)

	decodedData, err := urls.DecodeDataURL(u.Path[3:])
	s.Require().NoError(err)
	spew.Dump(decodedData, base64.StdEncoding.EncodeToString(decodedData))

	cu := &protobuf.Community{}
	err = proto.Unmarshal(decodedData, cu)
	s.Require().NoError(err)

	spew.Dump(cu)
}

OOOOoor the data is corrupted, which I'm going to presume for the moment that it isn't.

@felicio Do you know what protobuf is the source for the above url? Sorry for the ping @felicio I found the protobuf that it is intended for. I'll thank you in advance of the help I'm certain you would have given 🙏

@Samyoul
Copy link
Member

Samyoul commented Jun 28, 2023

Hmm, I've noticed something funny:

    expect(
      (
        await createCommunityURLWithData(
          {
            description: community.description.identity!.description,
            displayName: community.description.identity!.displayName,
            color: community.description.identity!.color,
            membersCount: 446_744,
            tagIndices: [1, 33, 51],
          },
          community.privateKey
        )
      ).toString()
    ).toBe(

This does not have the same field order as the protobuf:

status-web protobufs

message Community {
 string display_name = 1;
 string description = 2;
 uint32 members_count = 3;
 string color = 4;
 repeated uint32 tag_indices = 5;
}

message Community {
string display_name = 1;
string description = 2;
uint32 members_count = 3;
string color = 4;
repeated uint32 tag_indices = 5;
}

Which could explain the type error above.


Follow up, no it doesn't the decoded protobuf details below: #3665 (comment)

@MishkaRogachev
Copy link
Contributor Author

Ok @MishkaRogachev @borismelnik this actually fixes the functionality and the tests pass.

@Samyoul, this patch works fine! Many thanks!

Screenshot 2023-06-28 at 19 59 16

@Samyoul
Copy link
Member

Samyoul commented Jun 28, 2023

I've ran the following byte output through a generic protobuf decoder and I get the following result:

0a 44 0a 07 44 6f 6f 64 6c 65 73 12 27 43 6f 6c 6f 72 69 6e 67 20 74 68 65 20 77 6f 72 6c 64 20 77 69 74 68 20 6a 6f 79 20 e2 80 a2 20 e1 b4 97 20 e2 80 a2 18 98 a2 1b 22 07 23 31 33 31 44 32 46 2a 03 01 21 33
Byte Range Field Number Type Content
0-9 1 string Doodles
9-50 2 string Coloring the world with joy • ᴗ •
50-54 3 varint As Int: 446744As Signed Int: 223372
54-63 4 string #131D2F
63-68 5 string �!3

Which looks fine up until the last field:

tagIndices: [1, 33, 51],
repeated uint32 tag_indices = 5;
63-68 | 5 | string | �!3

@MishkaRogachev MishkaRogachev marked this pull request as ready for review June 29, 2023 09:23
@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch from 04cce5e to 6ed874c Compare June 29, 2023 12:30
@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch from 6ed874c to 5b12a63 Compare June 29, 2023 12:46
@MishkaRogachev MishkaRogachev changed the base branch from feat/generate-share-urls to develop June 29, 2023 12:46
@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch from 368b05c to 78e5377 Compare June 29, 2023 13:26
@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch from 78e5377 to e9594e8 Compare June 29, 2023 13:32
@MishkaRogachev
Copy link
Contributor Author

For reviewers: the most significant changes located in protocol/messenger_share_urls.go

Copy link
Contributor

@borismelnik borismelnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will close other PRs :)

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good job

protocol/messenger_share_urls.go Outdated Show resolved Hide resolved
protocol/messenger_share_urls.go Outdated Show resolved Hide resolved
protocol/messenger_share_urls.go Outdated Show resolved Hide resolved
Copy link
Member

@Samyoul Samyoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests in this PR Yes there are.

@@ -0,0 +1,411 @@
package protocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have some tests that parse expected url strings? This way we can ensure breaking changes to functionality gets addressed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually quite close to what I was thinking.

url := fmt.Sprintf("%s/c/%s#%s", baseShareURL, communityData, signature)

Comment on lines +503 to +505
if strings.HasPrefix(urlContents[0], "c/") {
return m.parseCommunityURLWithData(strings.TrimPrefix(urlContents[0], "c/"), urlContents[1])
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would c/#urlfragment be a valid url that would be mis-parsed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@Samyoul Samyoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing my request for changes 😄

@Samyoul Samyoul dismissed their stale review June 29, 2023 23:52

Because I was wrong, there is a whole big file of tests.

Copy link
Member

@Samyoul Samyoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MishkaRogachev for your work on this PR!

@MishkaRogachev
Copy link
Contributor Author

@Samyoul @felicio @borismelnik I tried to add some new tests to see if we can parse urls generated by Status Web:

func (s *MessengerShareUrlsSuite) TestParseCommunityURLFromWeb() {
	const url = "https://status.app/c/iyKACkQKB0Rvb2RsZXMSJ0NvbG9yaW5nIHRoZSB3b3JsZCB3aXRoIGpveSDigKIg4bSXIOKAohiYohsiByMxMzFEMkYqAwEhMwM=#QnO2hw5tVAE-MD5i8Mq4s_oGWd0rRFmlObgRUNQXtUNwP1ixFw914Y4-BQpF08KOqpaULCh7UCtlWR-O0YP8MwA="
	urlData, err := s.m.ParseSharedURL(url)
	s.Require().NoError(err)
	s.Require().NotNil(urlData)

	s.Require().NotNil(urlData.Community)
	s.Require().Equal("Doodles", urlData.Community.DisplayName)
	s.Require().Equal("Coloring the world with joy • ᴗ •", urlData.Community.Description)
	s.Require().Len(urlData.Community.MembersCount, 1)
	s.Require().Equal("#131D2F", urlData.Community.Color)
	s.Require().Equal([]uint32{1, 33, 51}, urlData.Community.TagIndices)
}

And it seems something wrong in our decodeDataURL, tests fails with err : brotli: CL_SPACE

@MishkaRogachev MishkaRogachev force-pushed the feat/generate-and-parse-share-urls branch from 419e857 to d8c2f1f Compare July 3, 2023 13:55
@MishkaRogachev MishkaRogachev merged commit 511d6bf into develop Jul 4, 2023
6 of 7 checks passed
@MishkaRogachev MishkaRogachev deleted the feat/generate-and-parse-share-urls branch July 4, 2023 13:48
@MishkaRogachev
Copy link
Contributor Author

And it seems something wrong in our decodeDataURL, tests fails with err : brotli: CL_SPACE

Opened an issue for that: #3713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants