mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
added flag and icon for message that was successfuly decrypted
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6836 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
292bdfa324
commit
cd43900eb9
7 changed files with 31 additions and 15 deletions
|
@ -48,20 +48,21 @@
|
|||
#define RS_MSG_OUTBOX 0x03 /* Outbox */
|
||||
#define RS_MSG_DRAFTBOX 0x05 /* Draftbox */
|
||||
|
||||
#define RS_MSG_NEW 0x0010 /* New */
|
||||
#define RS_MSG_TRASH 0x0020 /* Trash */
|
||||
#define RS_MSG_UNREAD_BY_USER 0x0040 /* Unread by user */
|
||||
#define RS_MSG_REPLIED 0x0080 /* Message is replied */
|
||||
#define RS_MSG_FORWARDED 0x0100 /* Message is forwarded */
|
||||
#define RS_MSG_STAR 0x0200 /* Message is marked with a star */
|
||||
#define RS_MSG_NEW 0x000010 /* New */
|
||||
#define RS_MSG_TRASH 0x000020 /* Trash */
|
||||
#define RS_MSG_UNREAD_BY_USER 0x000040 /* Unread by user */
|
||||
#define RS_MSG_REPLIED 0x000080 /* Message is replied */
|
||||
#define RS_MSG_FORWARDED 0x000100 /* Message is forwarded */
|
||||
#define RS_MSG_STAR 0x000200 /* Message is marked with a star */
|
||||
// system message
|
||||
#define RS_MSG_USER_REQUEST 0x0400 /* user request */
|
||||
#define RS_MSG_FRIEND_RECOMMENDATION 0x0800 /* friend recommendation */
|
||||
#define RS_MSG_USER_REQUEST 0x000400 /* user request */
|
||||
#define RS_MSG_FRIEND_RECOMMENDATION 0x000800 /* friend recommendation */
|
||||
#define RS_MSG_SYSTEM (RS_MSG_USER_REQUEST | RS_MSG_FRIEND_RECOMMENDATION)
|
||||
#define RS_MSG_ENCRYPTED 0x1000 /* message is encrypted */
|
||||
#define RS_MSG_SIGNATURE_CHECKS 0x2000 /* message was signed, and signature checked */
|
||||
#define RS_MSG_SIGNED 0x4000 /* message was signed and signature didn't check */
|
||||
#define RS_MSG_LOAD_EMBEDDED_IMAGES 0x8000 /* load embedded images */
|
||||
#define RS_MSG_ENCRYPTED 0x001000 /* message is encrypted */
|
||||
#define RS_MSG_SIGNATURE_CHECKS 0x002000 /* message was signed, and signature checked */
|
||||
#define RS_MSG_SIGNED 0x004000 /* message was signed and signature didn't check */
|
||||
#define RS_MSG_LOAD_EMBEDDED_IMAGES 0x008000 /* load embedded images */
|
||||
#define RS_MSG_DECRYPTED 0x010000 /* message was previously encrypted, and is now decrypted */
|
||||
|
||||
#define RS_CHAT_LOBBY_EVENT_PEER_LEFT 0x01
|
||||
#define RS_CHAT_LOBBY_EVENT_PEER_STATUS 0x02
|
||||
|
|
|
@ -433,6 +433,7 @@ const uint32_t RS_MSG_FLAGS_DISTANT = 0x00008000;
|
|||
const uint32_t RS_MSG_FLAGS_SIGNATURE_CHECKS = 0x00010000;
|
||||
const uint32_t RS_MSG_FLAGS_SIGNED = 0x00020000;
|
||||
const uint32_t RS_MSG_FLAGS_LOAD_EMBEDDED_IMAGES = 0x00040000;
|
||||
const uint32_t RS_MSG_FLAGS_DECRYPTED = 0x00080000;
|
||||
|
||||
class RsMessageItem: public RsItem
|
||||
{
|
||||
|
|
|
@ -1511,6 +1511,9 @@ void p3MsgService::initRsMI(RsMsgItem *msg, MessageInfo &mi)
|
|||
if (msg->msgFlags & RS_MSG_FLAGS_ENCRYPTED)
|
||||
mi.msgflags |= RS_MSG_ENCRYPTED ;
|
||||
|
||||
if (msg->msgFlags & RS_MSG_FLAGS_DECRYPTED)
|
||||
mi.msgflags |= RS_MSG_DECRYPTED ;
|
||||
|
||||
if (msg->msgFlags & RS_MSG_FLAGS_TRASH)
|
||||
{
|
||||
mi.msgflags |= RS_MSG_TRASH;
|
||||
|
@ -1603,6 +1606,9 @@ void p3MsgService::initRsMIS(RsMsgItem *msg, MsgInfoSummary &mis)
|
|||
if (msg->msgFlags & RS_MSG_FLAGS_ENCRYPTED)
|
||||
mis.msgflags |= RS_MSG_ENCRYPTED ;
|
||||
|
||||
if (msg->msgFlags & RS_MSG_FLAGS_DECRYPTED)
|
||||
mis.msgflags |= RS_MSG_DECRYPTED ;
|
||||
|
||||
if (msg->msgFlags & RS_MSG_FLAGS_SIGNED)
|
||||
mis.msgflags |= RS_MSG_SIGNED ;
|
||||
|
||||
|
@ -2007,6 +2013,7 @@ bool p3MsgService::decryptMessage(const std::string& mId)
|
|||
msgi = *item ; // copy everything
|
||||
msgi.msgId = msgId ; // restore the correct message id, to make it consistent
|
||||
msgi.msgFlags &= ~RS_MSG_FLAGS_ENCRYPTED ; // just in case.
|
||||
msgi.msgFlags |= RS_MSG_FLAGS_DECRYPTED ; // previousy encrypted msg is now decrypted
|
||||
msgi.PeerId(senders_id.toStdString()) ;
|
||||
|
||||
for(std::list<std::string>::iterator it(msgi.msgto.ids.begin());it!=msgi.msgto.ids.end();++it) if(*it == own_hash) *it = own_pgp_id ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue