Get server integration tests passing again
* Set up UserStore to have the current user, so that channel messages can be sent. This is needed now that pending messages are represented more similarly to regular messages. * Drop buffer inside of an `AppContext.update` block, so that the Buffer's release hook is called in time. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
95ef70e4f4
commit
31b5602dc1
+6
-2
@@ -111,8 +111,12 @@ impl UserStore {
|
||||
.ok_or_else(|| anyhow!("server responded with no users"))
|
||||
}
|
||||
|
||||
pub fn current_user(&self) -> &watch::Receiver<Option<Arc<User>>> {
|
||||
&self.current_user
|
||||
pub fn current_user(&self) -> Option<Arc<User>> {
|
||||
self.current_user.borrow().clone()
|
||||
}
|
||||
|
||||
pub fn watch_current_user(&self) -> watch::Receiver<Option<Arc<User>>> {
|
||||
self.current_user.clone()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user