Make message handling more synchronous and fill history on portal create

This commit is contained in:
Tulir Asokan
2019-05-21 23:44:14 +03:00
parent adc7257490
commit 6f2a51410f
14 changed files with 198 additions and 64 deletions

View File

@ -142,6 +142,11 @@ func (ext *ExtendedConn) handleMessageChatUpdate(message []byte) {
if !ok {
continue
}
go chatUpdateHandler.HandleChatUpdate(event)
if ext.shouldCallSynchronously(chatUpdateHandler) {
chatUpdateHandler.HandleChatUpdate(event)
} else {
go chatUpdateHandler.HandleChatUpdate(event)
}
}
}