Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Datovka projects
mobile Datovka
Commits
6c48e906
Commit
6c48e906
authored
May 25, 2017
by
Martin Straka
Browse files
Fixed download message task - mark as read only received messages
parent
f4b15ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/worker/task_download_message.cpp
View file @
6c48e906
...
...
@@ -81,7 +81,8 @@ void TaskDownloadMessage::run(void)
enum
TaskDownloadMessage
::
Result
TaskDownloadMessage
::
downloadMessage
(
IsdsSession
::
IsdsContext
&
ctx
,
NetLayer
*
netLayer
,
DbWrapper
*
dbWrapper
,
qint64
msgId
,
enum
Messages
::
MessageType
msgDirect
,
MessageListModel
*
messageModel
)
qint64
msgId
,
enum
Messages
::
MessageType
msgDirect
,
MessageListModel
*
messageModel
)
{
if
(
ctx
.
username
.
isEmpty
())
{
Q_ASSERT
(
0
);
...
...
@@ -124,7 +125,7 @@ enum TaskDownloadMessage::Result TaskDownloadMessage::downloadMessage(
/*
* Following functions don't have to check return values
* because they are complementary actions for message download
* (not required).
* (not required
for success complete message download
).
*/
/* Send SOAP request to download message author info */
...
...
@@ -139,10 +140,12 @@ enum TaskDownloadMessage::Result TaskDownloadMessage::downloadMessage(
dbWrapper
->
updateAuthorInfo
(
ctx
.
username
,
userType
,
authorName
,
msgId
,
ctx
.
last_isds_msg
);
/* Send SOAP request mark message as read */
netLayer
->
sendSoapRequest
(
ctx
,
MESSAGE_SERVICE
,
XmlLayer
::
xmlCreateMarkMessageAsDownloadedSoapRequest
(
msgId
),
xmlDataOut
);
/* Send SOAP request mark message as read (only for received message) */
if
(
Messages
::
TYPE_RECEIVED
==
msgDirect
)
{
netLayer
->
sendSoapRequest
(
ctx
,
MESSAGE_SERVICE
,
XmlLayer
::
xmlCreateMarkMessageAsDownloadedSoapRequest
(
msgId
),
xmlDataOut
);
}
return
DL_SUCCESS
;
}
Write
Preview
Supports
Markdown
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