Fix borrowing issue for matrix
parent
0649ea0503
commit
82bff1b904
|
@ -468,12 +468,15 @@ pub async fn create_matrix_client(
|
||||||
|
|
||||||
let event_handler = Arc::new(MatrixHandler { message_tx });
|
let event_handler = Arc::new(MatrixHandler { message_tx });
|
||||||
|
|
||||||
|
{
|
||||||
let on_msg_ctx = event_handler.clone();
|
let on_msg_ctx = event_handler.clone();
|
||||||
|
let client_2 = client.clone();
|
||||||
client
|
client
|
||||||
.register_event_handler(move |ev, room| {
|
.register_event_handler(move |ev, room| {
|
||||||
on_room_message_event(client.clone(), on_msg_ctx.clone(), ev, room)
|
on_room_message_event(client_2.clone(), on_msg_ctx.clone(), ev, room)
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
}
|
||||||
|
|
||||||
let on_redact_ctx = event_handler.clone();
|
let on_redact_ctx = event_handler.clone();
|
||||||
client
|
client
|
||||||
|
|
Loading…
Reference in New Issue