mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 13:17:42 +02:00
fix(core/notifications): include username only for groups
This commit is contained in:
@ -303,7 +303,8 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN
|
||||
}
|
||||
val computeMessages: () -> Unit = { computeNotificationMessages(data.notification, conversationId)}
|
||||
|
||||
fun setNotificationText(text: String, includeUsername: Boolean = true) {
|
||||
fun setNotificationText(text: String) {
|
||||
val includeUsername = context.database.getDMOtherParticipant(conversationId) == null
|
||||
cachedMessages.computeIfAbsent(conversationId) {
|
||||
sortedMapOf()
|
||||
}[orderKey] = if (includeUsername) "$senderUsername: $text" else text
|
||||
|
Reference in New Issue
Block a user