当前位置: 首页>>代码示例>>Java>>正文


Java TLRPC.TL_decryptedMessageService方法代码示例

本文整理汇总了Java中org.telegram.tgnet.TLRPC.TL_decryptedMessageService方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.TL_decryptedMessageService方法的具体用法?Java TLRPC.TL_decryptedMessageService怎么用?Java TLRPC.TL_decryptedMessageService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.telegram.tgnet.TLRPC的用法示例。


在下文中一共展示了TLRPC.TL_decryptedMessageService方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendClearHistoryMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendClearHistoryMessage(TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }
    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionFlushHistory();
        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:27,代码来源:SecretChatHelper.java

示例2: sendMessagesReadMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessagesReadMessage(TLRPC.EncryptedChat encryptedChat, ArrayList<Long> random_ids, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }
    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionReadMessages();
        reqSend.action.random_ids = random_ids;
        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:28,代码来源:SecretChatHelper.java

示例3: sendMessagesDeleteMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendMessagesDeleteMessage(TLRPC.EncryptedChat encryptedChat, ArrayList<Long> random_ids, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }
    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionDeleteMessages();
        reqSend.action.random_ids = random_ids;
        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:28,代码来源:SecretChatHelper.java

示例4: sendNotifyLayerMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendNotifyLayerMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }
    if (sendingNotifyLayer.contains(encryptedChat.id)) {
        return;
    }
    sendingNotifyLayer.add(encryptedChat.id);
    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionNotifyLayer();
        reqSend.action.layer = CURRENT_SECRET_CHAT_LAYER;
        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:32,代码来源:SecretChatHelper.java

示例5: sendRequestKeyMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendRequestKeyMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionRequestKey();
        reqSend.action.exchange_id = encryptedChat.exchange_id;
        reqSend.action.g_a = encryptedChat.g_a;

        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:31,代码来源:SecretChatHelper.java

示例6: sendAcceptKeyMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendAcceptKeyMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionAcceptKey();
        reqSend.action.exchange_id = encryptedChat.exchange_id;
        reqSend.action.key_fingerprint = encryptedChat.future_key_fingerprint;
        reqSend.action.g_b = encryptedChat.g_a_or_b;

        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:32,代码来源:SecretChatHelper.java

示例7: sendCommitKeyMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendCommitKeyMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionCommitKey();
        reqSend.action.exchange_id = encryptedChat.exchange_id;
        reqSend.action.key_fingerprint = encryptedChat.future_key_fingerprint;

        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:31,代码来源:SecretChatHelper.java

示例8: sendAbortKeyMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendAbortKeyMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage, long excange_id) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionAbortKey();
        reqSend.action.exchange_id = excange_id;

        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:30,代码来源:SecretChatHelper.java

示例9: sendNoopMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendNoopMessage(final TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionNoop();
        message = createServiceSecretMessage(encryptedChat, reqSend.action);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:28,代码来源:SecretChatHelper.java

示例10: sendTTLMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendTTLMessage(TLRPC.EncryptedChat encryptedChat, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionSetMessageTTL();
        reqSend.action.ttl_seconds = encryptedChat.ttl;
        message = createServiceSecretMessage(encryptedChat, reqSend.action);

        MessageObject newMsgObj = new MessageObject(message, null, false);
        newMsgObj.messageOwner.send_state = MessageObject.MESSAGE_SEND_STATE_SENDING;
        ArrayList<MessageObject> objArr = new ArrayList<>();
        objArr.add(newMsgObj);
        MessagesController.getInstance().updateInterfaceWithMessages(message.dialog_id, objArr);
        NotificationCenter.getInstance().postNotificationName(NotificationCenter.dialogsNeedReload);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:36,代码来源:SecretChatHelper.java

示例11: sendScreenshotMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public void sendScreenshotMessage(TLRPC.EncryptedChat encryptedChat, ArrayList<Long> random_ids, TLRPC.Message resendMessage) {
    if (!(encryptedChat instanceof TLRPC.TL_encryptedChat)) {
        return;
    }

    TLRPC.TL_decryptedMessageService reqSend;
    if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
        reqSend = new TLRPC.TL_decryptedMessageService();
    } else {
        reqSend = new TLRPC.TL_decryptedMessageService_layer8();
        reqSend.random_bytes = new byte[15];
        Utilities.random.nextBytes(reqSend.random_bytes);
    }

    TLRPC.Message message;

    if (resendMessage != null) {
        message = resendMessage;
        reqSend.action = message.action.encryptedAction;
    } else {
        reqSend.action = new TLRPC.TL_decryptedMessageActionScreenshotMessages();
        reqSend.action.random_ids = random_ids;
        message = createServiceSecretMessage(encryptedChat, reqSend.action);

        MessageObject newMsgObj = new MessageObject(message, null, false);
        newMsgObj.messageOwner.send_state = MessageObject.MESSAGE_SEND_STATE_SENDING;
        ArrayList<MessageObject> objArr = new ArrayList<>();
        objArr.add(newMsgObj);
        MessagesController.getInstance().updateInterfaceWithMessages(message.dialog_id, objArr);
        NotificationCenter.getInstance().postNotificationName(NotificationCenter.dialogsNeedReload);
    }
    reqSend.random_id = message.random_id;

    performSendEncryptedRequest(reqSend, message, encryptedChat, null, null, null);
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:36,代码来源:SecretChatHelper.java


注:本文中的org.telegram.tgnet.TLRPC.TL_decryptedMessageService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。