@@ -501,13 +501,9 @@ export class Algorithm extends EventEmitter {
501
501
// Split out the easy rooms first (leave and invite)
502
502
const memberships = splitRoomsByMembership ( rooms ) ;
503
503
for ( const room of memberships [ EffectiveMembership . Invite ] ) {
504
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
505
- console . log ( `[DEBUG] "${ room . name } " (${ room . roomId } ) is an Invite` ) ;
506
504
newTags [ DefaultTagID . Invite ] . push ( room ) ;
507
505
}
508
506
for ( const room of memberships [ EffectiveMembership . Leave ] ) {
509
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
510
- console . log ( `[DEBUG] "${ room . name } " (${ room . roomId } ) is Historical` ) ;
511
507
newTags [ DefaultTagID . Archived ] . push ( room ) ;
512
508
}
513
509
@@ -518,23 +514,19 @@ export class Algorithm extends EventEmitter {
518
514
let inTag = false ;
519
515
if ( tags . length > 0 ) {
520
516
for ( const tag of tags ) {
521
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
522
- console . log ( `[DEBUG] "${ room . name } " (${ room . roomId } ) is tagged as ${ tag } ` ) ;
523
517
if ( ! isNullOrUndefined ( newTags [ tag ] ) ) {
524
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
525
- console . log ( `[DEBUG] "${ room . name } " (${ room . roomId } ) is tagged with VALID tag ${ tag } ` ) ;
526
518
newTags [ tag ] . push ( room ) ;
527
519
inTag = true ;
528
520
}
529
521
}
530
522
}
531
523
532
524
if ( ! inTag ) {
533
- // TODO: Determine if DM and push there instead: https://github.com/vector-im/riot-web/issues/14236
534
- newTags [ DefaultTagID . Untagged ] . push ( room ) ;
535
-
536
- // TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
537
- console . log ( `[DEBUG] " ${ room . name } " ( ${ room . roomId } ) is Untagged` ) ;
525
+ if ( DMRoomMap . getUserIdForRoomId ( room . roomId ) ) {
526
+ newTags [ DefaultTagID . DM ] . push ( room ) ;
527
+ } else {
528
+ newTags [ DefaultTagID . Untagged ] . push ( room ) ;
529
+ }
538
530
}
539
531
}
540
532
0 commit comments