//--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- /// <summary> /// Sends a <seealso cref="RosterRequestMessage"/> to the server and requests the current roster. /// </summary> /// <returns>The result of the request.</returns> public async Task<MessageResponseHelperResult<IQMessage>> requestRosterAsync() { Predicate<IQMessage> predicate = (x) => { return true; }; AsyncMessageResponseHelper<IQMessage> helper = new AsyncMessageResponseHelper<IQMessage>(CONNECTION, predicate); RosterRequestMessage msg = new RosterRequestMessage(CONNECTION.account.getFullJid(), CONNECTION.account.getBareJid()); return await helper.startAsync(msg); }
/// <summary> /// Sends a RosterRequestMessage to the server and requests the current roster. /// </summary> /// <returns>True if sending the message succeeded.</returns> public async Task <bool> sendRequestRosterMessageAsync() { RosterRequestMessage msg = new RosterRequestMessage(CONNECTION.account.getFullJid(), CONNECTION.account.getBareJid()); return(await CONNECTION.sendAsync(msg)); }