Search code examples
botframeworkskype-bots

Skype Converting Item Numbers to Emoji


My bot is displaying in Skype, but the 6 and 8 appear as emoji.

enter image description here

This is just a normal FormFlow form:

public class WeightsForm
{
    public Weight FromUnitType { get; set; }
    public double Amount { get; set; }
    public Weight ToUnitType { get; set; }


    public static IForm<WeightsForm> BuildForm()
    {
        return new FormBuilder<WeightsForm>()
            .Message("Now you can select weight conversion details.")
            .AddRemainingFields()
            .Build();
    }
}

with Weights based on an enum:

public enum Weight
{
    None,
    Ton,
    Slug,
    Pound,
    Ounce,
    Grain,
    Picogram,
    Nanogram,
    Microgram,
    Milligram,
    Centigram,
    Decigram,
    Gram,
    Dekagram,
    Hectogram,
    Kilogram,
    Megagram,
    Gigagram,
    Teragram
}

What is the best way to get this to display, on Skype, without the emoji?


Solution

  • To fix this you need to change the template used for generating the numbers so that Skype does not interpret this as an emoji. If you add this annotation on your class: [Template(TemplateUsage.EnumSelectOne, ChoiceFormat = "{0}. {1}")] That would fix the problem for single selections. Alternatively you could change the default template in builder.Configuration.Templates. If you wanted to fix EnumSelectMany you could add that as well.

    What version of the SDK are you running? If you are running the latest and unless you have tweaked the choice style you should get buttons on skype by default. (The next release will have more style options as well.)