Send proper from when buddy is not in roster
This commit is contained in:
parent
1342c511cd
commit
3daa381077
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue