protocols/matrix: Give the user notice on initial sync.

* This can be 30+ seconds of silence, so give user a little
  feedback that "stuff is happening"
This commit is contained in:
Alexander von Gluck IV 2023-12-22 08:59:46 -06:00
parent d4b934093d
commit 53a5c5ed1a

View File

@ -153,6 +153,12 @@ MatrixApp::StartLoop()
status.AddInt32("status", (int32)STATUS_ONLINE);
SendMessage(status);
BMessage syncStatus(IM_MESSAGE);
syncStatus.AddInt32("im_what", IM_MESSAGE_RECEIVED);
syncStatus.AddString("user_name", APP_NAME);
syncStatus.AddString("body", B_TRANSLATE("Synchronizing with Matrix server. Please wait..."));
SendMessage(syncStatus);
mtx::http::SyncOpts opts;
opts.timeout = 0;
client->sync(opts, &initial_sync_handler);