Sharp.Xmpp
Sharp.Xmpp copied to clipboard
Channel Invite Decline response wrong - Bug
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.