Sharp.Xmpp icon indicating copy to clipboard operation
Sharp.Xmpp copied to clipboard

Channel Invite Decline response wrong - Bug

Open cimframe opened this issue 8 years ago • 0 comments

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.

cimframe avatar Mar 26 '17 16:03 cimframe