File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -326,12 +326,6 @@ impl Context {
326
326
return Ok ( None ) ;
327
327
} ;
328
328
329
- let notify = if let Some ( notify_list) = status_update_item. notify {
330
- let self_addr = instance. get_webxdc_self_addr ( self ) . await ?;
331
- notify_list. contains ( & self_addr)
332
- } else {
333
- false
334
- } ;
335
329
let mut notify_msg_id = instance. id ;
336
330
let mut notify_text = "" . to_string ( ) ;
337
331
let mut param_changed = false ;
@@ -412,12 +406,17 @@ impl Context {
412
406
} ) ;
413
407
}
414
408
415
- if notify && !notify_text. is_empty ( ) && from_id != ContactId :: SELF {
416
- self . emit_event ( EventType :: IncomingWebxdcNotify {
417
- contact_id : from_id,
418
- msg_id : notify_msg_id,
419
- text : notify_text,
420
- } ) ;
409
+ if !notify_text. is_empty ( ) && from_id != ContactId :: SELF {
410
+ if let Some ( notify_list) = status_update_item. notify {
411
+ let self_addr = instance. get_webxdc_self_addr ( self ) . await ?;
412
+ if notify_list. contains ( & self_addr) {
413
+ self . emit_event ( EventType :: IncomingWebxdcNotify {
414
+ contact_id : from_id,
415
+ msg_id : notify_msg_id,
416
+ text : notify_text,
417
+ } ) ;
418
+ }
419
+ }
421
420
}
422
421
423
422
Ok ( Some ( status_update_serial) )
You can’t perform that action at this time.
0 commit comments