| @@ -808,10 +808,13 @@ impl InnerServer { |
| 808 | } |
808 | } |
| 809 | }; |
809 | }; |
| 810 | |
810 | |
| |
811 | let mut refresh_status_bar = false; |
| |
812 | |
| 811 | match &event { |
813 | match &event { |
| 812 | AnyToDeviceEvent::RoomKey(_) => {} |
814 | AnyToDeviceEvent::RoomKey(_) => {} |
| 813 | AnyToDeviceEvent::RoomKeyRequest(_) => {} |
815 | AnyToDeviceEvent::RoomKeyRequest(_) => {} |
| 814 | AnyToDeviceEvent::KeyVerificationRequest(e) => { |
816 | AnyToDeviceEvent::KeyVerificationRequest(e) => { |
| |
817 | refresh_status_bar = true; |
| 815 | if let Some(client) = self.get_client() { |
818 | if let Some(client) = self.get_client() { |
| 816 | if let Some(request) = client |
819 | if let Some(request) = client |
| 817 | .encryption() |
820 | .encryption() |
| @@ -836,6 +839,7 @@ impl InnerServer { |
| 836 | } |
839 | } |
| 837 | } |
840 | } |
| 838 | AnyToDeviceEvent::KeyVerificationStart(e) => { |
841 | AnyToDeviceEvent::KeyVerificationStart(e) => { |
| |
842 | refresh_status_bar = true; |
| 839 | if let Some(client) = self.get_client() { |
843 | if let Some(client) = self.get_client() { |
| 840 | use matrix_sdk::encryption::verification::Verification; |
844 | use matrix_sdk::encryption::verification::Verification; |
| 841 | match client |
845 | match client |
| @@ -892,20 +896,28 @@ impl InnerServer { |
| 892 | } |
896 | } |
| 893 | } |
897 | } |
| 894 | AnyToDeviceEvent::KeyVerificationCancel(e) => { |
898 | AnyToDeviceEvent::KeyVerificationCancel(e) => { |
| |
899 | refresh_status_bar = true; |
| 895 | handle_event(&event, e.content.transaction_id.to_string()) |
900 | handle_event(&event, e.content.transaction_id.to_string()) |
| 896 | .await; |
901 | .await; |
| 897 | } |
902 | } |
| 898 | AnyToDeviceEvent::KeyVerificationAccept(e) => { |
903 | AnyToDeviceEvent::KeyVerificationAccept(e) => { |
| |
904 | refresh_status_bar = true; |
| 899 | handle_event(&event, e.content.transaction_id.to_string()).await |
905 | handle_event(&event, e.content.transaction_id.to_string()).await |
| 900 | } |
906 | } |
| 901 | AnyToDeviceEvent::KeyVerificationKey(e) => { |
907 | AnyToDeviceEvent::KeyVerificationKey(e) => { |
| |
908 | refresh_status_bar = true; |
| 902 | handle_event(&event, e.content.transaction_id.to_string()).await |
909 | handle_event(&event, e.content.transaction_id.to_string()).await |
| 903 | } |
910 | } |
| 904 | AnyToDeviceEvent::KeyVerificationMac(e) => { |
911 | AnyToDeviceEvent::KeyVerificationMac(e) => { |
| |
912 | refresh_status_bar = true; |
| 905 | handle_event(&event, e.content.transaction_id.to_string()).await |
913 | handle_event(&event, e.content.transaction_id.to_string()).await |
| 906 | } |
914 | } |
| 907 | _ => {} |
915 | _ => {} |
| 908 | } |
916 | } |
| |
917 | |
| |
918 | if refresh_status_bar { |
| |
919 | Weechat::bar_item_update("buffer_modes"); |
| |
920 | } |
| 909 | } |
921 | } |
| 910 | |
922 | |
| 911 | pub async fn receive_member( |
923 | pub async fn receive_member( |