web-shared: Update references to "private message" and "PM".

Updates any use of "private message" and "PM" in the `web/shared`
directory to instead use "direct messages".
This commit is contained in:
Lauryn Menard
2023-06-16 17:41:25 +02:00
committed by Tim Abbott
parent 85096cfb4d
commit c8b04fc562
2 changed files with 11 additions and 10 deletions

View File

@@ -75,10 +75,11 @@ export function query_matches_string(
function clean_query(query: string): string {
query = remove_diacritics(query);
// When `abc ` with a space at the end is typed in a
// contenteditable widget such as the composebox PM section, the
// space at the end was a `no break-space (U+00A0)` instead of
// `space (U+0020)`, which lead to no matches in those cases.
// When `abc ` with a space at the end is typed in
// a content-editable widget such as the composebox
// direct message section, the space at the end was
// a `no break-space (U+00A0)` instead of `space (U+0020)`,
// which lead to no matches in those cases.
query = query.replace(/\u00A0/g, " ");
return query;

View File

@@ -85,8 +85,8 @@ export function maybe_ping_server(worker: TypingStatusWorker, recipient_ids: num
* rate, and keeps a timer to send a "stopped typing" notice when the user
* hasn't typed for a few seconds.
*
* Zulip supports typing notifications only for PMs (both 1:1 and group); so
* composing a stream message should be treated like composing no message at
* Zulip supports typing notifications only for both 1:1 and group direct messages;
* so composing a stream message should be treated like composing no message at
* all.
*
* Call with `new_recipient_ids` of `null` when the user actively stops
@@ -97,11 +97,11 @@ export function maybe_ping_server(worker: TypingStatusWorker, recipient_ids: num
* See docs/subsystems/typing-indicators.md for detailed background on the
* typing indicators system.
*
* @param {*} worker Callbacks for reaching the real world. See typing.js
* @param {*} worker Callbacks for reaching the real world. See typing.js
* for implementations.
* @param {*} new_recipient_ids The users the PM being composed is addressed to,
* as a sorted array of user IDs; or `null` if no PM is being composed
* anymore.
* @param {*} new_recipient_ids The users the direct message being composed is
* addressed to, as a sorted array of user IDs; or `null` if no direct message
* is being composed anymore.
*/
export function update(worker: TypingStatusWorker, new_recipient_ids: number[] | null): void {
if (state !== null) {