更新到 LayerKit 0.22.0 后 LYRConversationOptionsDistinctByParticipantsKey 未解析的标识符

LYRConversationOptionsDistinctByParticipantsKey unresolved identifier after updating to LayerKit 0.22.0

从 Layer 0.17 更新到 0.22 后,我收到此构建错误: "Use of unresolved identifier 'LYRConversationOptionsDistinctByParticipantsKey'"

代码:

let currentConversation = try! appDelegate.layerClient.newConversation(withParticipants: participantSet, 
    options: [LYRConversationOptionsDistinctByParticipantsKey : 0])

(为了便于阅读,新行上的选项)

阅读更新日志总是值得的!

0.22.0 Introduced the LYRConversationOptions object meant for configuring conversation instance upon initialization. It replaces the LYRConversationOptionsMetadataKey, LYRConversationOptionsDeliveryReceiptsEnabledKey and LYRConversationOptionsDistinctByParticipantsKey which was previously passed through the options argument with a dictionary.

LYRClient.newConversation(withParticipants: participantSet, 
   options: [LYRConversationOptionsDistinctByParticipantsKey : 0])

变成

let options = LYRConversationOptions()
options.distintByParticipants = false
layerClient.newConversation(withParticipants: participantSet, 
    options: options)