forked from github/szkolny
[API/Vulcan] Add marking message as read in the e-register.
This commit is contained in:
parent
9cc4da5fe9
commit
1bdafd489c
@ -1632,6 +1632,15 @@ public class Vulcan implements EdziennikInterface {
|
||||
recipient.fullName = profile.getStudentNameLong();
|
||||
}
|
||||
if (!message.seen) {
|
||||
studentId = profile.getStudentData("studentId", -1);
|
||||
studentLoginId = profile.getStudentData("studentLoginId", -1);
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("WiadomoscId", message.id);
|
||||
json.addProperty("FolderWiadomosci", "Odebrane");
|
||||
json.addProperty("Status", "Widoczna");
|
||||
json.addProperty("LoginId", studentLoginId);
|
||||
json.addProperty("IdUczen", studentId);
|
||||
apiRequest(schoolSymbol+"/ZmienStatusWiadomosci", json, result -> { });
|
||||
app.db.metadataDao().setSeen(profile.getId(), message, true);
|
||||
if (message.type != TYPE_SENT) {
|
||||
app.db.messageRecipientDao().add(new MessageRecipient(profile.getId(), -1, -1, System.currentTimeMillis(), message.id));
|
||||
|
Loading…
Reference in New Issue
Block a user