Commit 0f69fddeb3

0f69fddeb31e176a85e907645b586d7a02aba9a5

parent: 513c30591c

Unsigned

Darafei Praliaskouski <me@komzpa.net> · 2026-06-23 19:32 UTC
committer: <strk@kbt.io>

fix: refresh room verification status

Layout: unified · split

src/room/mod.rs +9 −1
@@ -417,6 +417,10 @@ impl BufferInputCallbackAsync for MatrixRoom {
417417}
418418
419419impl MatrixRoom {
420 fn update_status_bar(&self) {
421 Weechat::bar_item_update("buffer_modes");
422 }
423
420424 pub fn is_encrypted(&self) -> bool {
421425 self.members
422426 .runtime
@@ -1090,7 +1094,9 @@ impl MatrixRoom {
10901094 ambiguity_change,
10911095 smart_filter_delay_ms,
10921096 )
1093 .await
1097 .await;
1098
1099 self.update_status_bar();
10941100 }
10951101
10961102 fn set_prev_batch(&self) {
@@ -1178,5 +1184,7 @@ impl MatrixRoom {
11781184 }
11791185 _ => (),
11801186 }
1187
1188 self.update_status_bar();
11811189 }
11821190}
src/room/verification.rs +3
@@ -10,6 +10,7 @@ use matrix_sdk::{
1010 UserId,
1111 },
1212};
13use weechat::Weechat;
1314
1415use crate::{
1516 connection::Connection,
@@ -222,5 +223,7 @@ impl Verification {
222223 }
223224 _ => {}
224225 }
226
227 Weechat::bar_item_update("buffer_modes");
225228 }
226229}
src/server.rs +12
@@ -808,10 +808,13 @@ impl InnerServer {
808808 }
809809 };
810810
811 let mut refresh_status_bar = false;
812
811813 match &event {
812814 AnyToDeviceEvent::RoomKey(_) => {}
813815 AnyToDeviceEvent::RoomKeyRequest(_) => {}
814816 AnyToDeviceEvent::KeyVerificationRequest(e) => {
817 refresh_status_bar = true;
815818 if let Some(client) = self.get_client() {
816819 if let Some(request) = client
817820 .encryption()
@@ -836,6 +839,7 @@ impl InnerServer {
836839 }
837840 }
838841 AnyToDeviceEvent::KeyVerificationStart(e) => {
842 refresh_status_bar = true;
839843 if let Some(client) = self.get_client() {
840844 use matrix_sdk::encryption::verification::Verification;
841845 match client
@@ -892,20 +896,28 @@ impl InnerServer {
892896 }
893897 }
894898 AnyToDeviceEvent::KeyVerificationCancel(e) => {
899 refresh_status_bar = true;
895900 handle_event(&event, e.content.transaction_id.to_string())
896901 .await;
897902 }
898903 AnyToDeviceEvent::KeyVerificationAccept(e) => {
904 refresh_status_bar = true;
899905 handle_event(&event, e.content.transaction_id.to_string()).await
900906 }
901907 AnyToDeviceEvent::KeyVerificationKey(e) => {
908 refresh_status_bar = true;
902909 handle_event(&event, e.content.transaction_id.to_string()).await
903910 }
904911 AnyToDeviceEvent::KeyVerificationMac(e) => {
912 refresh_status_bar = true;
905913 handle_event(&event, e.content.transaction_id.to_string()).await
906914 }
907915 _ => {}
908916 }
917
918 if refresh_status_bar {
919 Weechat::bar_item_update("buffer_modes");
920 }
909921 }
910922
911923 pub async fn receive_member(