maybe it's a good idea to move these 4 lines to a new method `ThreadUI.onMessageReceived` too