mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Fixed legacy getText method on ChatMessage
This commit is contained in:
parent
a705f8dda6
commit
3b64a06c3b
1 changed files with 7 additions and 3 deletions
|
|
@ -259,9 +259,7 @@ const string &ChatMessagePrivate::getText () {
|
|||
cText = internalContent.getBodyAsString();
|
||||
}
|
||||
} else {
|
||||
if (hasTextContent()) {
|
||||
cText = getTextContent()->getBodyAsString();
|
||||
} else if (!internalContent.isEmpty()) {
|
||||
if (!internalContent.isEmpty()) {
|
||||
cText = internalContent.getBodyAsString();
|
||||
} else {
|
||||
if (contents.size() > 0) {
|
||||
|
|
@ -482,6 +480,12 @@ LinphoneReason ChatMessagePrivate::receive () {
|
|||
// End of message modification
|
||||
// ---------------------------------------
|
||||
|
||||
// Remove internal content as it is not needed anymore and will confuse some old methods like getText()
|
||||
internalContent.setBody("");
|
||||
internalContent.setContentType(ContentType(""));
|
||||
// Also remove current step so we go through all modifiers if message is re-sent
|
||||
currentRecvStep = ChatMessagePrivate::Step::None;
|
||||
|
||||
setState(ChatMessage::State::Delivered, false);
|
||||
|
||||
if (errorCode <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue