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

Channel Invite Decline response wrong - Bug #56

Open cimframe opened 7 years ago

cimframe commented 7 years ago

I found in testing that the whole InviteDeclined class was not forming the response message correctly. The old code:

public InviteDeclined(Invite invite, string reason)
            : base(invite.From, invite.To, Xml.Element(xTag, MucNs.NsUser)) {
        XElement.Child(Xml.Element(inviteTag).Child(Xml.Element(reasonTag)));
        SendTo = invite.ReceivedFrom;
        Reason = reason;
}

Should read:

public InviteDeclined (Invite invite, string reason)
        : base (invite.To, invite.From, Xml.Element (xTag, MucNs.NsUser)) {
    XElement.Child (Xml.Element (inviteTag).Child (Xml.Element (reasonTag)));
    SendTo = invite.SendTo;
    Reason = reason;
}

The code was sending the decline response to the user who was doing the declining instead of the person who did the inviting.