@@ -79,14 +79,22 @@ async fn room_msg_can_support_image_thumbnail() -> Result<()> {
7979 while i > 0 {
8080 if let Some ( diff) = stream. next ( ) . now_or_never ( ) . flatten ( ) {
8181 match diff. action ( ) . as_str ( ) {
82- "PushBack" | "Set" => {
82+ "PushBack" => {
8383 let value = diff
8484 . value ( )
8585 . expect ( "diff pushback action should have valid value" ) ;
8686 if let Some ( msg_content) = match_media_msg ( & value, mimetype, & jpg_name) {
8787 found = Some ( msg_content) ;
8888 }
8989 }
90+ "Set" => {
91+ let value = diff
92+ . value ( )
93+ . expect ( "diff set action should have valid value" ) ;
94+ if let Some ( msg_content) = match_media_msg ( & value, mimetype, & jpg_name) {
95+ found = Some ( msg_content) ;
96+ }
97+ }
9098 "Reset" => {
9199 let values = diff
92100 . values ( )
@@ -198,14 +206,22 @@ async fn room_msg_can_support_video_thumbnail() -> Result<()> {
198206 while i > 0 {
199207 if let Some ( diff) = stream. next ( ) . now_or_never ( ) . flatten ( ) {
200208 match diff. action ( ) . as_str ( ) {
201- "PushBack" | "Set" => {
209+ "PushBack" => {
202210 let value = diff
203211 . value ( )
204212 . expect ( "diff pushback action should have valid value" ) ;
205213 if let Some ( msg_content) = match_media_msg ( & value, mimetype, & mp4_name) {
206214 found = Some ( msg_content) ;
207215 }
208216 }
217+ "Set" => {
218+ let value = diff
219+ . value ( )
220+ . expect ( "diff set action should have valid value" ) ;
221+ if let Some ( msg_content) = match_media_msg ( & value, mimetype, & mp4_name) {
222+ found = Some ( msg_content) ;
223+ }
224+ }
209225 "Reset" => {
210226 let values = diff
211227 . values ( )
@@ -307,14 +323,22 @@ async fn room_msg_can_support_file_thumbnail() -> Result<()> {
307323 while i > 0 {
308324 if let Some ( diff) = stream. next ( ) . now_or_never ( ) . flatten ( ) {
309325 match diff. action ( ) . as_str ( ) {
310- "PushBack" | "Set" => {
326+ "PushBack" => {
311327 let value = diff
312328 . value ( )
313329 . expect ( "diff pushback action should have valid value" ) ;
314330 if let Some ( msg_content) = match_media_msg ( & value, mimetype, & pdf_name) {
315331 found = Some ( msg_content) ;
316332 }
317333 }
334+ "Set" => {
335+ let value = diff
336+ . value ( )
337+ . expect ( "diff set action should have valid value" ) ;
338+ if let Some ( msg_content) = match_media_msg ( & value, mimetype, & pdf_name) {
339+ found = Some ( msg_content) ;
340+ }
341+ }
318342 "Reset" => {
319343 let values = diff
320344 . values ( )
@@ -408,14 +432,22 @@ async fn room_msg_can_support_location_thumbnail() -> Result<()> {
408432 while i > 0 {
409433 if let Some ( diff) = stream. next ( ) . now_or_never ( ) . flatten ( ) {
410434 match diff. action ( ) . as_str ( ) {
411- "PushBack" | "Set" => {
435+ "PushBack" => {
412436 let value = diff
413437 . value ( )
414438 . expect ( "diff pushback action should have valid value" ) ;
415439 if let Some ( msg_content) = match_location_msg ( & value, body, geo_uri) {
416440 found = Some ( msg_content) ;
417441 }
418442 }
443+ "Set" => {
444+ let value = diff
445+ . value ( )
446+ . expect ( "diff set action should have valid value" ) ;
447+ if let Some ( msg_content) = match_location_msg ( & value, body, geo_uri) {
448+ found = Some ( msg_content) ;
449+ }
450+ }
419451 "Reset" => {
420452 let values = diff
421453 . values ( )
0 commit comments