Commit 601a1a65 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

The cpimFrom address field in the ChatMessage is useless.

parent 59177851
...@@ -57,9 +57,6 @@ public: ...@@ -57,9 +57,6 @@ public:
void setApplyModifiers (bool value) { applyModifiers = value; } void setApplyModifiers (bool value) { applyModifiers = value; }
const Address &getCpimFromAddress () const { return cpimFrom; }
void setCpimFromAddress (const Address &addr);
void setDirection (ChatMessage::Direction dir); void setDirection (ChatMessage::Direction dir);
void setState(ChatMessage::State state); void setState(ChatMessage::State state);
...@@ -129,7 +126,6 @@ private: ...@@ -129,7 +126,6 @@ private:
unsigned int storageId = 0; unsigned int storageId = 0;
Address from; Address from;
Address to; Address to;
Address cpimFrom;
time_t time = 0; time_t time = 0;
std::string id; std::string id;
std::string appData; std::string appData;
......
...@@ -60,11 +60,6 @@ void ChatMessagePrivate::setChatRoom (shared_ptr<ChatRoom> cr) { ...@@ -60,11 +60,6 @@ void ChatMessagePrivate::setChatRoom (shared_ptr<ChatRoom> cr) {
chatRoom = cr; chatRoom = cr;
} }
void ChatMessagePrivate::setCpimFromAddress (const Address &addr) {
cpimFrom = addr;
cpimFrom.clean();
}
void ChatMessagePrivate::setDirection (ChatMessage::Direction dir) { void ChatMessagePrivate::setDirection (ChatMessage::Direction dir) {
direction = dir; direction = dir;
} }
......
...@@ -557,7 +557,6 @@ shared_ptr<ChatMessage> ChatRoom::createMessage () { ...@@ -557,7 +557,6 @@ shared_ptr<ChatMessage> ChatRoom::createMessage () {
shared_ptr<ChatMessage> chatMessage = ObjectFactory::create<ChatMessage>(getSharedFromThis()); shared_ptr<ChatMessage> chatMessage = ObjectFactory::create<ChatMessage>(getSharedFromThis());
chatMessage->setToAddress(d->peerAddress); chatMessage->setToAddress(d->peerAddress);
chatMessage->setFromAddress(Address(linphone_core_get_identity(d->core))); chatMessage->setFromAddress(Address(linphone_core_get_identity(d->core)));
chatMessage->getPrivate()->setCpimFromAddress(chatMessage->getFromAddress());
chatMessage->getPrivate()->setTime(ms_time(0)); chatMessage->getPrivate()->setTime(ms_time(0));
return chatMessage; return chatMessage;
} }
......
...@@ -40,7 +40,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::encode (const shared_ptr<Ch ...@@ -40,7 +40,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::encode (const shared_ptr<Ch
cpimMessage.addCpimHeader(cpimContentTypeHeader); cpimMessage.addCpimHeader(cpimContentTypeHeader);
Cpim::FromHeader cpimFromHeader; Cpim::FromHeader cpimFromHeader;
cpimFromHeader.setValue(cpimAddressAsString(message->getPrivate()->getCpimFromAddress())); cpimFromHeader.setValue(cpimAddressAsString(message->getFromAddress()));
cpimMessage.addMessageHeader(cpimFromHeader); cpimMessage.addMessageHeader(cpimFromHeader);
Cpim::ToHeader cpimToHeader; Cpim::ToHeader cpimToHeader;
cpimToHeader.setValue(cpimAddressAsString(message->getToAddress())); cpimToHeader.setValue(cpimAddressAsString(message->getToAddress()));
...@@ -133,7 +133,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::decode (const shared_ptr<Ch ...@@ -133,7 +133,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::decode (const shared_ptr<Ch
// Modify the initial message since there was no error // Modify the initial message since there was no error
message->setInternalContent(newContent); message->setInternalContent(newContent);
if (cpimFromAddress.isValid()) if (cpimFromAddress.isValid())
message->getPrivate()->setCpimFromAddress(cpimFromAddress); message->setFromAddress(cpimFromAddress);
if (cpimToAddress.isValid()) if (cpimToAddress.isValid())
message->setToAddress(cpimToAddress); message->setToAddress(cpimToAddress);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment