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
68881ab2
Commit
68881ab2
authored
Sep 20, 2018
by
Ronan
Browse files
fix(MainDb): do not send imdn on old db versions
parent
498b28ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db/main-db.cpp
View file @
68881ab2
...
...
@@ -48,7 +48,7 @@ using namespace std;
LINPHONE_BEGIN_NAMESPACE
namespace
{
constexpr
unsigned
int
ModuleVersionEvents
=
makeVersion
(
1
,
0
,
4
);
constexpr
unsigned
int
ModuleVersionEvents
=
makeVersion
(
1
,
0
,
5
);
constexpr
unsigned
int
ModuleVersionFriends
=
makeVersion
(
1
,
0
,
0
);
constexpr
unsigned
int
ModuleVersionLegacyFriendsImport
=
makeVersion
(
1
,
0
,
0
);
constexpr
unsigned
int
ModuleVersionLegacyHistoryImport
=
makeVersion
(
1
,
0
,
0
);
...
...
@@ -1105,6 +1105,21 @@ void MainDbPrivate::updateSchema () {
" LEFT JOIN conference_participant_event ON conference_participant_event.event_id = event.id"
" LEFT JOIN conference_subject_event ON conference_subject_event.event_id = event.id"
;
}
if
(
version
<
makeVersion
(
1
,
0
,
5
))
{
const
string
queryDelivery
=
"UPDATE conference_chat_message_event"
" SET delivery_notification_required = 0"
" WHERE direction = "
+
Utils
::
toString
(
int
(
ChatMessage
::
Direction
::
Incoming
))
+
" AND state = "
+
Utils
::
toString
(
int
(
ChatMessage
::
State
::
Delivered
));
*
session
<<
queryDelivery
;
const
string
queryDisplay
=
"UPDATE conference_chat_message_event"
" SET delivery_notification_required = 0, display_notification_required = 0"
" WHERE direction = "
+
Utils
::
toString
(
int
(
ChatMessage
::
Direction
::
Incoming
))
+
" AND state = "
+
Utils
::
toString
(
int
(
ChatMessage
::
State
::
Displayed
));
*
session
<<
queryDisplay
;
}
}
// -----------------------------------------------------------------------------
...
...
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