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 { function clean_query(query: string): string {
query = remove_diacritics(query); query = remove_diacritics(query);
// When `abc ` with a space at the end is typed in a // When `abc ` with a space at the end is typed in
// contenteditable widget such as the composebox PM section, the // a content-editable widget such as the composebox
// space at the end was a `no break-space (U+00A0)` instead of // direct message section, the space at the end was
// `space (U+0020)`, which lead to no matches in those cases. // a `no break-space (U+00A0)` instead of `space (U+0020)`,
// which lead to no matches in those cases.
query = query.replace(/\u00A0/g, " "); query = query.replace(/\u00A0/g, " ");
return query; 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 * rate, and keeps a timer to send a "stopped typing" notice when the user
* hasn't typed for a few seconds. * hasn't typed for a few seconds.
* *
* Zulip supports typing notifications only for PMs (both 1:1 and group); so * Zulip supports typing notifications only for both 1:1 and group direct messages;
* composing a stream message should be treated like composing no message at * so composing a stream message should be treated like composing no message at
* all. * all.
* *
* Call with `new_recipient_ids` of `null` when the user actively stops * 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 * See docs/subsystems/typing-indicators.md for detailed background on the
* typing indicators system. * 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. * for implementations.
* @param {*} new_recipient_ids The users the PM being composed is addressed to, * @param {*} new_recipient_ids The users the direct message being composed is
* as a sorted array of user IDs; or `null` if no PM is being composed * addressed to, as a sorted array of user IDs; or `null` if no direct message
* anymore. * is being composed anymore.
*/ */
export function update(worker: TypingStatusWorker, new_recipient_ids: number[] | null): void { export function update(worker: TypingStatusWorker, new_recipient_ids: number[] | null): void {
if (state !== null) { if (state !== null) {