Skip to content

Instantly share code, notes, and snippets.

@daltonbr
Created December 29, 2023 18:37
Show Gist options
  • Save daltonbr/b5def34975306230e59ce2231681d326 to your computer and use it in GitHub Desktop.
Save daltonbr/b5def34975306230e59ce2231681d326 to your computer and use it in GitHub Desktop.
Correct CIF in Helpshift
private Dictionary<string, object> GetConversationConfig(Dictionary<string, object> cifDictionary)
{
Dictionary<string, object> configMap = new()
{
//{ "fullPrivacy", MagCenterSettings.HelpshiftConfig.FullPrivacy },
{ "enableContactUs", _helpshiftSettings.GetEnableContactUsSetting(_segmentationPersistedDataAdapter) },
{ "tags", new[] { _helpshiftSettings.GetPayerSubscriberTag(_segmentationPersistedDataAdapter) } }
};
Dictionary<string, string> userId = new()
{
{ "type", "number" },
{ "value", _corePlayerPersistedDataAdapter.GetUserId().ToString() }
};
Dictionary<string, string> device = new()
{
{ "type", "singleline" },
{ "value", SystemInfo.deviceName }
};
cifDictionary ??= new Dictionary<string, object>();
cifDictionary["player_id"] = userId;
cifDictionary["device"] = device;
configMap.Add("cifs", cifDictionary);
return configMap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment