Compare commits
3 Commits
f758796d83
...
v4.11.81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
044631b05d | ||
| 4bc5b4d790 | |||
| da52ec84b7 |
@@ -143,10 +143,11 @@ class MatrixSyncService : Service() {
|
|||||||
val nm = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
val nm = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
ensureMessageChannel(nm)
|
ensureMessageChannel(nm)
|
||||||
|
|
||||||
joinedRooms.keys().forEach { roomId ->
|
val roomIds = joinedRooms.keys().asSequence().toList()
|
||||||
|
for (roomId in roomIds) {
|
||||||
val timeline = joinedRooms.optJSONObject(roomId)
|
val timeline = joinedRooms.optJSONObject(roomId)
|
||||||
?.optJSONObject("timeline") ?: return@forEach
|
?.optJSONObject("timeline") ?: continue
|
||||||
val events = timeline.optJSONArray("events") ?: return@forEach
|
val events = timeline.optJSONArray("events") ?: continue
|
||||||
|
|
||||||
for (i in 0 until events.length()) {
|
for (i in 0 until events.length()) {
|
||||||
val event = events.optJSONObject(i) ?: continue
|
val event = events.optJSONObject(i) ?: continue
|
||||||
@@ -157,7 +158,7 @@ class MatrixSyncService : Service() {
|
|||||||
if (eventId.isNotBlank() && !shownEventIds.add(eventId)) continue
|
if (eventId.isNotBlank() && !shownEventIds.add(eventId)) continue
|
||||||
|
|
||||||
val content = event.optJSONObject("content") ?: continue
|
val content = event.optJSONObject("content") ?: continue
|
||||||
val body = content.optString("body").ifBlank { continue }
|
val body = content.optString("body").takeIf { it.isNotBlank() } ?: continue
|
||||||
val sender = event.optString("sender")
|
val sender = event.optString("sender")
|
||||||
val senderName = sender.substringAfter("@").substringBefore(":")
|
val senderName = sender.substringAfter("@").substringBefore(":")
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paarrot",
|
"name": "paarrot",
|
||||||
"version": "4.11.80",
|
"version": "4.11.81",
|
||||||
"description": "Paarrot - A Matrix client based on Cinny",
|
"description": "Paarrot - A Matrix client based on Cinny",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user