From ec66cc41114febb847ea3b336f7a942a9d582325 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Mon, 25 Sep 2023 17:23:42 -0700 Subject: [PATCH 1/2] fix: codec not being registered --- ios/XMTPModule.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ios/XMTPModule.swift b/ios/XMTPModule.swift index b3586a023..3a97d17c7 100644 --- a/ios/XMTPModule.swift +++ b/ios/XMTPModule.swift @@ -79,11 +79,8 @@ public class XMTPModule: Module { // A method to update the conversations func updateClient(key: String, client: XMTP.Client?) { - if clients[key] == nil, let client { - ContentJson.initCodecs(client: client) - } - clients[key] = client + ContentJson.initCodecs(client: clients[key]) } // A method to retrieve a conversation From 9652871ac7e39e7823e271c60c6c62f3a0e24abf Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Mon, 25 Sep 2023 21:38:24 -0700 Subject: [PATCH 2/2] should fix codec registration --- ios/XMTPModule.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/XMTPModule.swift b/ios/XMTPModule.swift index 3a97d17c7..17c13e2ec 100644 --- a/ios/XMTPModule.swift +++ b/ios/XMTPModule.swift @@ -78,9 +78,9 @@ public class XMTPModule: Module { private var clients: [String: XMTP.Client] = [:] // A method to update the conversations - func updateClient(key: String, client: XMTP.Client?) { + func updateClient(key: String, client: XMTP.Client) { + ContentJson.initCodecs(client: client) clients[key] = client - ContentJson.initCodecs(client: clients[key]) } // A method to retrieve a conversation