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:
Joshua Goins
2025-11-09 10:07:59 -05:00
parent 5a7ae3563e
commit 1336194cf4

View File

@@ -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);
}