void Session::workUpdateShortChatMessage(InboundPkt &inboundPkt, qint64 msgId) { qCDebug(TG_CORE_SESSION) << "workUpdateShortChatMessage: msgId =" << QString::number(msgId, 16); mAsserter.check(inboundPkt.fetchInt() == (qint32)TL_UpdateShortChatMessage); qint32 flags = inboundPkt.fetchInt(); qint32 id = inboundPkt.fetchInt(); qint32 fromId = inboundPkt.fetchInt(); qint32 chatId = inboundPkt.fetchInt(); QString message = inboundPkt.fetchQString(); qint32 pts = inboundPkt.fetchInt(); qint32 pts_count = inboundPkt.fetchInt(); qint32 date = inboundPkt.fetchInt(); qint32 fwd_from_id = 0; qint32 fwd_date = 0; qint32 reply_to_msg_id = 0; bool unread = (flags & 1<<0); bool out = (flags & 1<<1); if(flags & (1<<2)) { fwd_from_id = inboundPkt.fetchInt(); fwd_date = inboundPkt.fetchInt(); } if(flags & (1<<3)) { reply_to_msg_id = inboundPkt.fetchInt(); } Q_EMIT updateShortChatMessage(id, fromId, chatId, message, pts, pts_count, date, fwd_from_id, fwd_date, reply_to_msg_id, unread, out); }
void Session::workUpdateShortChatMessage(InboundPkt &inboundPkt, qint64 msgId) { qCDebug(TG_CORE_SESSION) << "workUpdateShortChatMessage: msgId =" << QString::number(msgId, 16); Q_UNUSED(msgId) UpdatesType upd(&inboundPkt); bool unread = (upd.flags() & 0x1); bool out = (upd.flags() & 0x2); Q_EMIT updateShortChatMessage(upd.id(), upd.fromId(), upd.chatId(), upd.message(), upd.pts(), upd.ptsCount(), upd.date(), upd.fwdFromId(), upd.date(), upd.replyToMsgId(), unread, out); }