Don't send an erroneous SetTypingJob on start-up
You can see this while starting NeoChat, as it always fails because localMember() isn't valid at this point. This is called during the ChatBar setup as we're setting up the text, which also happens during room switch.
This commit is contained in:
@@ -346,6 +346,10 @@ void NeoChatRoom::forget()
|
||||
|
||||
void NeoChatRoom::sendTypingNotification(bool isTyping)
|
||||
{
|
||||
// During the chatbar setup sequence, this may get called while we're still initializing
|
||||
if (localMember().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
connection()->callApi<SetTypingJob>(BackgroundRequest, localMember().id(), id(), isTyping, 10000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user