Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
601a1a65
Commit
601a1a65
authored
Oct 13, 2017
by
Ghislain MARY
Browse files
The cpimFrom address field in the ChatMessage is useless.
parent
59177851
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
12 deletions
+2
-12
src/chat/chat-message/chat-message-p.h
src/chat/chat-message/chat-message-p.h
+0
-4
src/chat/chat-message/chat-message.cpp
src/chat/chat-message/chat-message.cpp
+0
-5
src/chat/chat-room/chat-room.cpp
src/chat/chat-room/chat-room.cpp
+0
-1
src/chat/modifier/cpim-chat-message-modifier.cpp
src/chat/modifier/cpim-chat-message-modifier.cpp
+2
-2
No files found.
src/chat/chat-message/chat-message-p.h
View file @
601a1a65
...
...
@@ -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
;
...
...
src/chat/chat-message/chat-message.cpp
View file @
601a1a65
...
...
@@ -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
;
}
...
...
src/chat/chat-room/chat-room.cpp
View file @
601a1a65
...
...
@@ -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
;
}
...
...
src/chat/modifier/cpim-chat-message-modifier.cpp
View file @
601a1a65
...
...
@@ -40,7 +40,7 @@ ChatMessageModifier::Result CpimChatMessageModifier::encode (const shared_ptr<Ch
cpimMessage
.
addCpimHeader
(
cpimContentTypeHeader
);
Cpim
::
FromHeader
cpimFromHeader
;
cpimFromHeader
.
setValue
(
cpimAddressAsString
(
message
->
get
Private
()
->
getCpim
FromAddress
()));
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
()
->
setCpim
FromAddress
(
cpimFromAddress
);
message
->
set
FromAddress
(
cpimFromAddress
);
if
(
cpimToAddress
.
isValid
())
message
->
setToAddress
(
cpimToAddress
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment