pgstath / Sharp.Xmpp

Sharp.Xmpp is looking for a maintainer! Unfortunatelly I do not have currently the time needed to maintain the library. Luckily a small but vibrant community has evolved around Sharp.Xmpp. If you would like to be the project's maintainer please sent an email to pgstath@gmail.com. This should include issues, tickets and commits that you have done for Sharp.Xmpp or other similar project. Sharp.Xmpp is a multiplatform, Windows and Android, .NET XMPP client assembly.Sharp.Xmpp supports IM functionality & a variety of XMPP extensions, is simple and is extensively tested against Android Xamarin. It is a fork of the currently frozen excellent S22.Xmpp project. Sharp.Xmpp will be at the FOSSDEM 2016 Real time DevRoom!
Other
84 stars 51 forks source link

Error in Availability Enum in Sharp.Xmpp.Im #16

Closed lovetox closed 8 years ago

lovetox commented 8 years ago

Everytime we get a Presence Stanza which includes a "show" element with the following text

xa or dnd

in the function ProcessStatusNotification

this code fails to map the text to a availability status

string show = e.InnerText.Capitalize();
availability = (Availability)Enum.Parse(
typeof(Availability), show);

because the availability enum looks like this

    public enum Availability
    {
          .
          .
          .
        /// <summary>
        /// The user or resource is busy.
        /// </summary>
        DoNotDisturb,

        /// <summary>
        /// The user or resource is away for an extended period.
        /// </summary>
        eXtensive Away
    }
pgstath commented 8 years ago

Thanks for noticing this. I will give it a look or you can create a pull request.

lovetox commented 8 years ago

21