(WFCCMessagePayload )payloadFromDict:(NSDictionary )payload {
WFCCMediaMessagePayload *content = [[WFCCMediaMessagePayload alloc] init];
content.contentType = [payload[@"type"] intValue];
content.searchableContent = payload[@"searchableContent"];
content.pushContent = payload[@"pushContent"];
content.pushData = payload[@"pushData"];
content.content = payload[@"content"];
FlutterStandardTypedData *binaryData = payload[@"binaryContent"];
if (binaryData) {
content.binaryContent = binaryData.data;
}
content.localContent = payload[@"localContent"];
content.mediaType = (WFCCMediaType)[payload[@"mediaType"] intValue];
content.remoteMediaUrl = payload[@"remoteMediaUrl"];
content.localMediaPath = payload[@"localMediaPath"];
content.mentionedType = [payload[@"mentionedtype"] intValue];//ios ImclientPlugin.m 这里单词拼写错误
content.mentionedTargets = payload[@"mentionedTargets"];
content.extra = payload[@"extra"];
return content;
}