@@ -139,7 +139,7 @@ class UnreadCounts(TypedDict):
139
139
all_mentions : int
140
140
unread_topics : Dict [Tuple [int , str ], int ] # stream_id, topic
141
141
unread_pms : Dict [int , int ] # sender_id
142
- unread_huddles : Dict [FrozenSet [int ], int ] # Group pms
142
+ unread_huddles : Dict [FrozenSet [int ], int ] # Group dms
143
143
streams : Dict [int , int ] # stream_id
144
144
145
145
@@ -207,7 +207,7 @@ def update_unreads(unreads: Dict[KeyT, int], key: KeyT) -> None:
207
207
)
208
208
update_unreads (unread_counts ["streams" ], stream_id )
209
209
# self-dm has only one display_recipient
210
- # 1-1 pms have 2 display_recipient
210
+ # 1-1 dms have 2 display_recipient
211
211
elif len (message ["display_recipient" ]) <= 2 :
212
212
update_unreads (unread_counts ["unread_pms" ], message ["sender_id" ])
213
213
else : # If it's a group dm
@@ -482,7 +482,7 @@ def index_messages(messages: List[Message], model: Any, index: Index) -> Index:
482
482
483
483
484
484
def classify_unread_counts (model : Any ) -> UnreadCounts :
485
- # TODO: support group pms
485
+ # TODO: support group dms
486
486
unread_msg_counts = model .initial_data ["unread_msgs" ]
487
487
488
488
unread_counts = UnreadCounts (
@@ -521,7 +521,7 @@ def classify_unread_counts(model: Any) -> UnreadCounts:
521
521
if stream_id not in model .muted_streams :
522
522
unread_counts ["all_msg" ] += count
523
523
524
- # store unread count of group pms in `unread_huddles`
524
+ # store unread count of group dms in `unread_huddles`
525
525
for group_pm in unread_msg_counts ["huddles" ]:
526
526
count = len (group_pm ["unread_message_ids" ])
527
527
user_ids = group_pm ["user_ids_string" ].split ("," )
0 commit comments