@@ -514,7 +514,7 @@ def group_pm_template() -> Message:
514514
515515
516516@pytest .fixture (params = ["pm_template" , "group_pm_template" ])
517- def private_message_fixture (request : Any ) -> Message :
517+ def direct_message_fixture (request : Any ) -> Message :
518518 return request .getfixturevalue (request .param )
519519
520520
@@ -1068,8 +1068,8 @@ def empty_index(
10681068 all_msg_ids = set (),
10691069 starred_msg_ids = set (),
10701070 mentioned_msg_ids = set (),
1071- private_msg_ids = set (),
1072- private_msg_ids_by_user_ids = defaultdict (set , {}),
1071+ direct_msg_ids = set (),
1072+ direct_msg_ids_by_user_ids = defaultdict (set , {}),
10731073 stream_msg_ids_by_stream_id = defaultdict (set , {}),
10741074 topic_msg_ids = defaultdict (dict , {}),
10751075 edited_messages = set (),
@@ -1104,7 +1104,7 @@ def index_stream(empty_index: Index) -> Index:
11041104 """
11051105 index = empty_index
11061106 index ["stream_msg_ids_by_stream_id" ] = defaultdict (set , {205 : {537286 }})
1107- index ["private_msg_ids " ] = {537287 , 537288 }
1107+ index ["direct_msg_ids " ] = {537287 , 537288 }
11081108 return index
11091109
11101110
@@ -1145,8 +1145,8 @@ def index_user(empty_index: Index) -> Index:
11451145 """
11461146 user_ids = frozenset ({5179 , 5140 })
11471147 index = empty_index
1148- index ["private_msg_ids_by_user_ids " ] = defaultdict (set , {user_ids : {537287 }})
1149- index ["private_msg_ids " ] = {537287 , 537288 }
1148+ index ["direct_msg_ids_by_user_ids " ] = defaultdict (set , {user_ids : {537287 }})
1149+ index ["direct_msg_ids " ] = {537287 , 537288 }
11501150 return index
11511151
11521152
@@ -1158,8 +1158,8 @@ def index_user_multiple(empty_index: Index) -> Index:
11581158 """
11591159 user_ids = frozenset ({5179 , 5140 , 5180 })
11601160 index = empty_index
1161- index ["private_msg_ids_by_user_ids " ] = defaultdict (set , {user_ids : {537288 }})
1162- index ["private_msg_ids " ] = {537287 , 537288 }
1161+ index ["direct_msg_ids_by_user_ids " ] = defaultdict (set , {user_ids : {537288 }})
1162+ index ["direct_msg_ids " ] = {537287 , 537288 }
11631163 return index
11641164
11651165
@@ -1178,7 +1178,7 @@ def index_all_starred(empty_index: Index, request: Any) -> Index:
11781178 msgs_with_stars = request .param
11791179 index = empty_index
11801180 index ["starred_msg_ids" ] = msgs_with_stars
1181- index ["private_msg_ids " ] = {537287 , 537288 }
1181+ index ["direct_msg_ids " ] = {537287 , 537288 }
11821182 for msg_id , msg in index ["messages" ].items ():
11831183 if msg_id in msgs_with_stars and "starred" not in msg ["flags" ]:
11841184 msg ["flags" ].append ("starred" )
@@ -1192,7 +1192,7 @@ def index_all_mentions(
11921192 mentioned_messages , wildcard_mentioned_messages = mentioned_messages_combination
11931193 index = empty_index
11941194 index ["mentioned_msg_ids" ] = mentioned_messages | wildcard_mentioned_messages
1195- index ["private_msg_ids " ] = {537287 , 537288 }
1195+ index ["direct_msg_ids " ] = {537287 , 537288 }
11961196 for msg_id , msg in index ["messages" ].items ():
11971197 if msg_id in mentioned_messages and "mentioned" not in msg ["flags" ]:
11981198 msg ["flags" ].append ("mentioned" )
0 commit comments