Compare commits

...
3 Commits
Author SHA1 Message Date
Felicio Mununga 173073a7f8 Create stale-yaks-appear.md 2024-04-22 16:48:46 +02:00
Felicio Mununga 81164f0253 f 2024-04-22 16:48:03 +02:00
Felicio Mununga d9bbe2b54c Update encode-url-data.ts 2024-04-22 16:31:33 +02:00
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@status-im/js": patch
---
fix user schema in `encode-url-data.ts`
@@ -66,7 +66,7 @@ export function decodeChannelURLData(data: string): Omit<
const userSchema = z.object({
displayName: z.string().max(24).nonempty(),
description: z.string().max(240).nonempty(),
description: z.string().max(240).optional(),
// fixme: await integration in native platforms
color: colorSchema.optional().default('#ffffff'),
})
@@ -75,7 +75,7 @@ export function encodeUserURLData(data: PlainMessage<User>): EncodedURLData {
return encodeURLData(new User(data).toBinary()) as EncodedURLData
}
export function decodeUserURLData(data: string): PlainMessage<User> {
export function decodeUserURLData(data: string) {
const deserialized = decodeURLData(data)
const user = User.fromBinary(deserialized.content).toJson()