mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
[headless] only offload to DatabaseExecutor when needed
when receiving a new conversation message
This commit is contained in:
@@ -81,9 +81,9 @@ constructor(
|
||||
|
||||
override fun eventOccurred(e: Event) {
|
||||
when (e) {
|
||||
is ConversationMessageReceivedEvent<*> -> dbExecutor.execute {
|
||||
is ConversationMessageReceivedEvent<*> -> {
|
||||
val h = e.messageHeader
|
||||
if (h is PrivateMessageHeader) {
|
||||
if (h is PrivateMessageHeader) dbExecutor.execute {
|
||||
val text = messagingManager.getMessageText(h.id)
|
||||
webSocketController.sendEvent(EVENT_CONVERSATION_MESSAGE, e.output(text))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user