mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
The cpimFrom address field in the ChatMessage is useless.
This commit is contained in:
parent
5917785107
commit
601a1a6564
4 changed files with 2 additions and 12 deletions
|
|
@ -57,9 +57,6 @@ public:
|
|||
|
||||
void setApplyModifiers (bool value) { applyModifiers = value; }
|
||||
|
||||
const Address &getCpimFromAddress () const { return cpimFrom; }
|
||||
void setCpimFromAddress (const Address &addr);
|
||||
|
||||
void setDirection (ChatMessage::Direction dir);
|
||||
|
||||
void setState(ChatMessage::State state);
|
||||
|
|
@ -129,7 +126,6 @@ private:
|
|||
unsigned int storageId = 0;
|
||||
Address from;
|
||||
Address to;
|
||||
Address cpimFrom;
|
||||
time_t time = 0;
|
||||
std::string id;
|
||||
std::string appData;
|
||||
|
|
|
|||
|
|
@ -60,11 +60,6 @@ void ChatMessagePrivate::setChatRoom (shared_ptr<ChatRoom> cr) {
|
|||
chatRoom = cr;
|
||||
}
|
||||
|
||||
void ChatMessagePrivate::setCpimFromAddress (const Address &addr) {
|
||||
cpimFrom = addr;
|
||||
cpimFrom.clean();
|
||||
}
|
||||
|
||||
void ChatMessagePrivate::setDirection (ChatMessage::Direction dir) {
|
||||
direction = dir;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -557,7 +557,6 @@ shared_ptr<ChatMessage> ChatRoom::createMessage () {
|
|||
shared_ptr<ChatMessage> chatMessage = ObjectFactory::create<ChatMessage>(getSharedFromThis());
|
||||
chatMessage->setToAddress(d->peerAddress);
|
||||
chatMessage->setFromAddress(Address(linphone_core_get_identity(d->core)));
|
||||
chatMessage->getPrivate()->setCpimFromAddress(chatMessage->getFromAddress());
|
||||
chatMessage->getPrivate()->setTime(ms_time(0));
|
||||
return chatMessage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::encode (const shared_ptr<Ch
|
|||
cpimMessage.addCpimHeader(cpimContentTypeHeader);
|
||||
|
||||
Cpim::FromHeader cpimFromHeader;
|
||||
cpimFromHeader.setValue(cpimAddressAsString(message->getPrivate()->getCpimFromAddress()));
|
||||
cpimFromHeader.setValue(cpimAddressAsString(message->getFromAddress()));
|
||||
cpimMessage.addMessageHeader(cpimFromHeader);
|
||||
Cpim::ToHeader cpimToHeader;
|
||||
cpimToHeader.setValue(cpimAddressAsString(message->getToAddress()));
|
||||
|
|
@ -133,7 +133,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::decode (const shared_ptr<Ch
|
|||
// Modify the initial message since there was no error
|
||||
message->setInternalContent(newContent);
|
||||
if (cpimFromAddress.isValid())
|
||||
message->getPrivate()->setCpimFromAddress(cpimFromAddress);
|
||||
message->setFromAddress(cpimFromAddress);
|
||||
if (cpimToAddress.isValid())
|
||||
message->setToAddress(cpimToAddress);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue