mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
- fixed up avatar exchange between peers
- reverted preceding commit about PNG/JPG in popup chat dialog. This only concerns internal data representation and this string has nothing to do with accepted image formats. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1704 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c255ec1a21
commit
dee82c5f1b
12 changed files with 31 additions and 28 deletions
|
@ -204,6 +204,7 @@ class NotifyBase
|
|||
virtual void notifyCustomState(const std::string& peer_id,const std::string& status_string) {}
|
||||
virtual void notifyHashingInfo(std::string fileinfo) { (void)fileinfo; return ; }
|
||||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files) { (void)files; }
|
||||
virtual void notifyPeerHasNewAvatar(std::string peer_id) { (void)peer_id; }
|
||||
};
|
||||
|
||||
const int NOTIFY_LIST_NEIGHBOURS = 1;
|
||||
|
|
|
@ -168,13 +168,6 @@ void p3Msgs::initRsChatInfo(RsChatMsgItem *c, ChatInfo &i)
|
|||
i.chatflags |= RS_CHAT_PUBLIC;
|
||||
//std::cerr << "RsServer::initRsChatInfo() Chat Public!!!";
|
||||
}
|
||||
//std::cerr << std::endl;
|
||||
|
||||
if(c->chatFlags & RS_CHAT_FLAG_AVATAR_AVAILABLE)
|
||||
{
|
||||
std::cerr << "p3msgs::initRsChatInfo(): new avatar available for peer " << i.rsid << ". Sending above." << std::endl ;
|
||||
i.chatflags |= RS_CHAT_AVATAR_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
void p3Msgs::getOwnAvatarData(unsigned char *& data,int& size)
|
||||
|
|
|
@ -399,6 +399,12 @@ std::list<RsChatMsgItem *> p3ChatService::getChatQueue()
|
|||
if(ca != NULL)
|
||||
{
|
||||
receiveAvatarJpegData(ca) ;
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Received avatar data for peer " << ca->PeerId() << ". Notifying." << std::endl ;
|
||||
#endif
|
||||
rsicontrol->getNotify().notifyPeerHasNewAvatar(ca->PeerId()) ;
|
||||
|
||||
delete item ;
|
||||
continue ;
|
||||
}
|
||||
|
@ -490,7 +496,7 @@ void p3ChatService::getAvatarJpegData(const std::string& peer_id,unsigned char *
|
|||
|
||||
std::map<std::string,AvatarInfo *>::const_iterator it = _avatars.find(peer_id) ;
|
||||
|
||||
std::cerr << "p3chatservice:: avatar requested from above. " << std::endl ;
|
||||
std::cerr << "p3chatservice:: avatar for peer " << peer_id << " requested from above. " << std::endl ;
|
||||
// has avatar. Return it strait away.
|
||||
//
|
||||
if(it!=_avatars.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue