Compare commits

...

3 Commits

8 changed files with 19 additions and 11 deletions

View File

@ -1,6 +1,7 @@
<h3>Wersja 4.11.9, 2022-09-18</h3> <h3>Wersja 4.12, 2022-09-21</h3>
<ul> <ul>
<li>Vulcan UONET+: naprawiono działanie systemu wiadomości. @Antoni-Czaplicki</li> <li>Vulcan UONET+: naprawiono działanie systemu wiadomości. @Antoni-Czaplicki</li>
<li>Vulcan UONET+: naprawiono błędy wersji 4.11.9 i starszych.</li>
<li>Poprawiono wyświetlanie lekcji odwołanych na stronie głównej.</li> <li>Poprawiono wyświetlanie lekcji odwołanych na stronie głównej.</li>
<li>Dodano dostęp do Laboratorium na ekranie logowania.</li> <li>Dodano dostęp do Laboratorium na ekranie logowania.</li>
<li>Usunięto obsługę dziennika EduDziennik. [*]</li> <li>Usunięto obsługę dziennika EduDziennik. [*]</li>

View File

@ -9,7 +9,7 @@
/*secret password - removed for source code publication*/ /*secret password - removed for source code publication*/
static toys AES_IV[16] = { static toys AES_IV[16] = {
0x50, 0x1a, 0x1e, 0x42, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 0x9f, 0x7e, 0x7a, 0xcd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat); unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);

View File

@ -26,16 +26,24 @@ class VulcanHebeMessageBoxes(
VULCAN_HEBE_ENDPOINT_MESSAGEBOX, VULCAN_HEBE_ENDPOINT_MESSAGEBOX,
lastSync = lastSync lastSync = lastSync
) { list, _ -> ) { list, _ ->
var found = false
for (messageBox in list) { for (messageBox in list) {
val name = messageBox.getString("Name") ?: continue val name = messageBox.getString("Name") ?: continue
val studentName = profile?.studentNameLong ?: continue val studentName = profile?.studentNameLong ?: continue
if (!name.startsWith(studentName)) if (!name.contains(studentName))
continue continue
data.messageBoxKey = messageBox.getString("GlobalKey") data.messageBoxKey = messageBox.getString("GlobalKey")
data.messageBoxName = name data.messageBoxName = name
found = true
break break
} }
if (!found && list.isNotEmpty()) {
list.firstOrNull()?.let { messageBox ->
data.messageBoxKey = messageBox.getString("GlobalKey")
data.messageBoxName = messageBox.getString("Name")
}
}
data.setSyncNext(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES, 7 * DAY) data.setSyncNext(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES, 7 * DAY)
onSuccess(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES) onSuccess(ENDPOINT_VULCAN_HEBE_MESSAGE_BOXES)
} }

View File

@ -98,9 +98,6 @@ class VulcanHebeMessages(
val receivers = message.getJsonArray("Receiver") val receivers = message.getJsonArray("Receiver")
?.asJsonObjectList() ?.asJsonObjectList()
?: return@forEach ?: return@forEach
val receiverReadDate =
if (receivers.size == 1) readDate
else -1
for (receiver in receivers) { for (receiver in receivers) {
val recipientId = if (messageType == TYPE_SENT) val recipientId = if (messageType == TYPE_SENT)
@ -108,6 +105,8 @@ class VulcanHebeMessages(
else else
-1 -1
val receiverReadDate = receiver.getLong("HasRead", -1)
val messageRecipientObject = MessageRecipient( val messageRecipientObject = MessageRecipient(
profileId, profileId,
recipientId, recipientId,

View File

@ -24,7 +24,7 @@ class VulcanHebeMessagesChangeStatus(
} }
init { let { init { let {
val messageKey = messageObject.body?.let { data.parseMessageMeta(it) }?.get("globalKey") ?: run { val messageKey = messageObject.body?.let { data.parseMessageMeta(it) }?.get("uuid") ?: run {
EventBus.getDefault().postSticky(MessageGetEvent(messageObject)) EventBus.getDefault().postSticky(MessageGetEvent(messageObject))
onSuccess() onSuccess()
return@let return@let

View File

@ -46,6 +46,6 @@ object Signing {
/*fun provideKey(param1: String, param2: Long): ByteArray {*/ /*fun provideKey(param1: String, param2: Long): ByteArray {*/
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray { fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
return "$param1.MTIzNDU2Nzg5MDqhAT3mMQ===.$param2".sha256() return "$param1.MTIzNDU2Nzg5MDRaOIVjKV===.$param2".sha256()
} }
} }

View File

@ -409,7 +409,7 @@ class WidgetTimetableProvider : AppWidgetProvider() {
// create an intent used to display the lesson details dialog // create an intent used to display the lesson details dialog
val itemIntent = Intent(app, LessonDialogActivity::class.java) val itemIntent = Intent(app, LessonDialogActivity::class.java)
itemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK/* or Intent.FLAG_ACTIVITY_CLEAR_TASK*/) itemIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK/* or Intent.FLAG_ACTIVITY_CLEAR_TASK*/)
val itemPendingIntent = PendingIntent.getActivity(app, appWidgetId, itemIntent, pendingIntentFlag()) val itemPendingIntent = PendingIntent.getActivity(app, appWidgetId, itemIntent, PendingIntent.FLAG_MUTABLE)
views.setPendingIntentTemplate(R.id.widgetTimetableListView, itemPendingIntent) views.setPendingIntentTemplate(R.id.widgetTimetableListView, itemPendingIntent)
if (!unified) if (!unified)

View File

@ -5,8 +5,8 @@ buildscript {
kotlin_version = '1.6.10' kotlin_version = '1.6.10'
release = [ release = [
versionName: "4.11.9", versionName: "4.12",
versionCode: 4110999 versionCode: 4120099
] ]
setup = [ setup = [