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


Java TLRPC.TL_message_secret方法代码示例

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


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

示例1: canAddMessageToMedia

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public static boolean canAddMessageToMedia(TLRPC.Message message) {
    if (message instanceof TLRPC.TL_message_secret && message.media instanceof TLRPC.TL_messageMediaPhoto && message.ttl != 0 && message.ttl <= 60) {
        return false;
    } else if (message.media instanceof TLRPC.TL_messageMediaPhoto ||
            message.media instanceof TLRPC.TL_messageMediaDocument && !MessageObject.isGifDocument(message.media.document)) {
        return true;
    } else if (!message.entities.isEmpty()) {
        for (int a = 0; a < message.entities.size(); a++) {
            TLRPC.MessageEntity entity = message.entities.get(a);
            if (entity instanceof TLRPC.TL_messageEntityUrl || entity instanceof TLRPC.TL_messageEntityTextUrl || entity instanceof TLRPC.TL_messageEntityEmail) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:17,代码来源:SharedMediaQuery.java

示例2: getMessageMediaType

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private int getMessageMediaType(TLRPC.Message message) {
    if (message instanceof TLRPC.TL_message_secret && (
            message.media instanceof TLRPC.TL_messageMediaPhoto && message.ttl > 0 && message.ttl <= 60 ||
                    MessageObject.isVoiceMessage(message) ||
                    MessageObject.isVideoMessage(message))) {
        return 1;
    } else if (message.media instanceof TLRPC.TL_messageMediaPhoto || MessageObject.isVideoMessage(message)) {
        return 0;
    }
    return -1;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:12,代码来源:MessagesStorage.java

示例3: isSecretPhoto

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public boolean isSecretPhoto() {
    return messageOwner instanceof TLRPC.TL_message_secret && messageOwner.media instanceof TLRPC.TL_messageMediaPhoto && messageOwner.ttl > 0 && messageOwner.ttl <= 60;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:4,代码来源:MessageObject.java

示例4: isSecretMedia

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
public boolean isSecretMedia() {
    return messageOwner instanceof TLRPC.TL_message_secret &&
            (messageOwner.media instanceof TLRPC.TL_messageMediaPhoto && messageOwner.ttl > 0 && messageOwner.ttl <= 60 || isVoice() || isVideo());
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:5,代码来源:MessageObject.java

示例5: newMessage

import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private TLRPC.Message newMessage(TLRPC.Message message) {
    if (message == null) {
        return null;
    }
    TLRPC.Message message2 = new TLRPC.Message();
    if (message instanceof TLRPC.TL_message) {
        message2 = new TLRPC.TL_message();
    } else if (message instanceof TLRPC.TL_message_secret) {
        message2 = new TLRPC.TL_message_secret();
    }
    message2.id = message.id;
    message2.from_id = message.from_id;
    message2.to_id = message.to_id;
    message2.date = message.date;
    message2.action = message.action;
    message2.reply_to_msg_id = message.reply_to_msg_id;
    message2.fwd_from = message.fwd_from;
    message2.reply_to_random_id = message.reply_to_random_id;
    message2.via_bot_name = message.via_bot_name;
    message2.edit_date = message.edit_date;
    message2.silent = message.silent;
    message2.message = message.message;
    if (message.media != null) {
        message2.media = newMessageMedia(message.media);
    }
    message2.flags = message.flags;
    message2.mentioned = message.mentioned;
    message2.media_unread = message.media_unread;
    message2.out = message.out;
    message2.unread = message.unread;
    message2.entities = message.entities;
    message2.reply_markup = message.reply_markup;
    message2.views = message.views;
    message2.via_bot_id = message.via_bot_id;
    message2.send_state = message.send_state;
    message2.fwd_msg_id = message.fwd_msg_id;
    message2.attachPath = message.attachPath;
    message2.params = message.params;
    message2.random_id = message.random_id;
    message2.local_id = message.local_id;
    message2.dialog_id = message.dialog_id;
    message2.ttl = message.ttl;
    message2.destroyTime = message.destroyTime;
    message2.layer = message.layer;
    message2.seq_in = message.seq_in;
    message2.seq_out = message.seq_out;
    message2.replyMessage = message.replyMessage;
    return message2;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:50,代码来源:ForwardProActivity.java


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