Beispiel #1
0
        //--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
        #region --Set-, Get- Methods--
        /// <summary>
        /// Sends an OmemoSetBundleInformationMessage for updating the given bundle information.
        /// </summary>
        /// <param name="bundleInfo">The bundle information you want to update.</param>
        /// <returns>The OmemoSetBundleInformationMessage result.</returns>
        public Task <MessageResponseHelperResult <IQMessage> > setBundleInfoAsync(OmemoBundleInformation bundleInfo)
        {
            Predicate <IQMessage> predicate = (x) => { return(true); };
            AsyncMessageResponseHelper <IQMessage> helper = new AsyncMessageResponseHelper <IQMessage>(CONNECTION, predicate);
            OmemoSetBundleInformationMessage       msg    = new OmemoSetBundleInformationMessage(CONNECTION.account.getFullJid(), bundleInfo);

            return(helper.startAsync(msg));
        }
Beispiel #2
0
        private void announceBundleInfo()
        {
            setState(OmemoHelperState.ANNOUNCING_BUNDLE_INFO);
            Logger.Info("[OMEMO HELPER](" + CONNECTION.account.getIdAndDomain() + ") Announcing bundle information for: " + CONNECTION.account.omemoDeviceId);
            if (announceBundleInfoHelper != null)
            {
                announceBundleInfoHelper.Dispose();
            }
            announceBundleInfoHelper = new MessageResponseHelper <IQMessage>(CONNECTION, announceBundleInfoMsg, onTimeout);
            OmemoSetBundleInformationMessage msg = new OmemoSetBundleInformationMessage(CONNECTION.account.getIdDomainAndResource(), CONNECTION.account.getOmemoBundleInformation(), CONNECTION.account.omemoDeviceId);

            announceBundleInfoHelper.start(msg);
        }