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
28e77ff2
Commit
28e77ff2
authored
Oct 03, 2017
by
Sylvain Berfini
🐮
Browse files
Added ChatMessageModifiers chain in reception
parent
61d1cdd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
src/chat/chat-message.cpp
src/chat/chat-message.cpp
+10
-3
src/content/content-type.cpp
src/content/content-type.cpp
+4
-0
src/content/content-type.h
src/content/content-type.h
+1
-0
No files found.
src/chat/chat-message.cpp
View file @
28e77ff2
...
...
@@ -904,6 +904,11 @@ LinphoneReason ChatMessagePrivate::receive() {
// Start of message modification
// ---------------------------------------
if
(
ContentType
::
isCPIM
(
getContentType
()))
{
CpimChatMessageModifier
ccmm
;
ccmm
.
decode
(
this
);
}
EncryptionChatMessageModifier
ecmm
;
int
retval
=
0
;
retval
=
ecmm
.
decode
(
this
);
...
...
@@ -914,8 +919,11 @@ LinphoneReason ChatMessagePrivate::receive() {
q
->
sendDeliveryNotification
(
reason
);
/* Return LinphoneReasonNone to avoid flexisip resending us a message we can't decrypt */
reason
=
LinphoneReasonNone
;
goto
end
;
return
reason
;
}
MultipartChatMessageModifier
mcmm
;
mcmm
.
decode
(
this
);
// ---------------------------------------
// End of message modification
...
...
@@ -929,7 +937,7 @@ LinphoneReason ChatMessagePrivate::receive() {
if
(
retval
>
0
)
{
reason
=
linphone_error_code_to_reason
(
retval
);
q
->
sendDeliveryNotification
(
reason
);
goto
end
;
return
reason
;
}
if
(
ContentType
::
isFileTransfer
(
getContentType
()))
{
...
...
@@ -943,7 +951,6 @@ LinphoneReason ChatMessagePrivate::receive() {
q
->
store
();
}
end:
return
reason
;
}
...
...
src/content/content-type.cpp
View file @
28e77ff2
...
...
@@ -152,4 +152,8 @@ bool ContentType::isText (const string &contentType) {
return
contentType
==
"text/plain"
;
}
bool
ContentType
::
isCPIM
(
const
string
&
contentType
)
{
return
contentType
==
"Message/CPIM"
;
}
LINPHONE_END_NAMESPACE
src/content/content-type.h
View file @
28e77ff2
...
...
@@ -59,6 +59,7 @@ public:
static
bool
isImIsComposing
(
const
std
::
string
&
contentType
);
static
bool
isImdn
(
const
std
::
string
&
contentType
);
static
bool
isText
(
const
std
::
string
&
contentType
);
static
bool
isCPIM
(
const
std
::
string
&
contentType
);
private:
L_DECLARE_PRIVATE
(
ContentType
);
...
...
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