Commit 3b7bca92a0

3b7bca92a02d073c73d307b198531242c716a8e2

parent: 85f0a4bc3c

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-11-21 21:40 UTC

room: Add the server name to the room name.

Layout: unified · split

src/room/mod.rs +4 −1
@@ -181,6 +181,7 @@ impl MessageQueue {
181181
182182impl RoomHandle {
183183 pub fn new(
184 server_name: &str,
184185 connection: &Rc<RefCell<Option<Connection>>>,
185186 config: Rc<RefCell<Config>>,
186187 room: Room,
@@ -206,7 +207,9 @@ impl RoomHandle {
206207 room,
207208 };
208209
209 let buffer_handle = BufferBuilderAsync::new(&room_id.to_string())
210 let buffer_name = format!("{}.{}", server_name, room_id);
211
212 let buffer_handle = BufferBuilderAsync::new(&buffer_name)
210213 .input_callback(room.clone())
211214 .close_callback(|_weechat: &Weechat, _buffer: &Buffer| {
212215 // TODO remove the roombuffer from the server here.
src/server.rs +1
@@ -665,6 +665,7 @@ impl InnerServer {
665665 room_id
666666 ));
667667 let buffer = RoomHandle::new(
668 &self.server_name,
668669 &self.connection,
669670 self.config.inner.clone(),
670671 room,