You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SetPrivilege methods never called set, hence never set any affiliation or role values. Instead, these overridden methods called a superfluous method PostSetPrivilege which did a get, but the purpose of the methods is in question. I propose rewriting the methods to do a set (hence, their name) and an example of one of the methods would look as follows:
/// <summary>
/// Allows owners and admins to change affiliations for an occupant.
/// </summary>
public bool SetPrivilege (Jid room, string nickname, Affiliation affiliation, string reason = null) {
room.ThrowIfNull ("room");
nickname.ThrowIfNull ("nickname");
var item = Xml.Element ("item")
.Attr ("affiliation", affiliation.ToString ().ToLower ())
.Attr ("nick", nickname);
if (!string.IsNullOrWhiteSpace (reason)) {
item.Child (Xml.Element ("reason").Text (reason));
}
var queryElement = Xml.Element ("query", MucNs.NsAdmin)
.Child (item);
var iq = im.IqRequest (IqType.Set, room, im.Jid, queryElement);
return iq.Type == IqType.Result;
}
The text was updated successfully, but these errors were encountered:
The SetPrivilege methods never called set, hence never set any affiliation or role values. Instead, these overridden methods called a superfluous method PostSetPrivilege which did a get, but the purpose of the methods is in question. I propose rewriting the methods to do a set (hence, their name) and an example of one of the methods would look as follows:
The text was updated successfully, but these errors were encountered: