Clear share info and publish session.updated.
(&mut self, session_id: &str)
| 914 | |
| 915 | /// Clear share info and publish session.updated. |
| 916 | pub fn unshare(&mut self, session_id: &str) -> Option<Session> { |
| 917 | let updated = { |
| 918 | let session = self.sessions.get_mut(session_id)?; |
| 919 | session.clear_share(); |
| 920 | session.clone() |
| 921 | }; |
| 922 | self.events.push(SessionEvent::Updated { |
| 923 | info: updated.clone(), |
| 924 | }); |
| 925 | self.publish_session_event(&SESSION_UPDATED_EVENT, &updated); |
| 926 | Some(updated) |
| 927 | } |
| 928 | |
| 929 | /// Set archived time and publish session.updated. |
| 930 | pub fn set_archived(&mut self, session_id: &str, time: Option<i64>) -> Option<Session> { |
no test coverage detected