Send proper from when buddy is not in roster

This commit is contained in:
HanzZ 2011-09-11 18:00:25 +02:00
parent 1342c511cd
commit 3daa381077

View file

@ -59,7 +59,11 @@ void Conversation::handleMessage(boost::shared_ptr<Swift::Message> &message, con
message->setFrom(buddy->getJID());
}
else {
// TODO: escape from and setFrom
std::string name = nickname;
if (name.find_last_of("@") != std::string::npos) {
name.replace(name.find_last_of("@"), 1, "%");
}
message->setFrom(name);
}
}
// PM message