Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiUserChat.GroupInviteEventArgs returned incorrect values - Bug #52

Open
cimframe opened this issue Feb 11, 2017 · 0 comments
Open

Comments

@cimframe
Copy link

The properties ChatRoom and From returned incorrect values. The rewritten class should look as follows:

	/// <summary>
	/// Represents a group invite event in a group chat. Ref XEP-0045
	/// </summary>
	public class GroupInviteEventArgs : EventArgs {

		/// <summary>
		/// Chat room specified in the invitation.
		/// </summary>
		public Jid ChatRoom => Data.SendTo;

		/// <summary>
		/// The full invite object.
		/// </summary>
		public Invite Data {
			get;
		}

		/// <summary>
		/// Person who sent the invitation.
		/// </summary>
		public Jid From => Data.From;

		/// <summary>
		/// Password (if any).
		/// </summary>
		public string Password => Data.Password;

		/// <summary>
		/// Message contained in the invitation.
		/// </summary>
		public string Reason => Data.Reason;

		/// <summary>
		/// Constructs a GroupInviteEventArgs.
		/// </summary>
		/// <param name="invite">Group Chat Invitation.</param>
		public GroupInviteEventArgs (Invite invite) {

			invite.ThrowIfNull ("invite");

			Data = invite;
		}
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant