mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
recent senders: Rename sender_info getter function for brevity.
We will also later use this function for attaching other information to it like whether the sender has been muted or not.
This commit is contained in:
committed by
Tim Abbott
parent
cf69ce166c
commit
e4cbfcaf1d
@@ -681,7 +681,7 @@ test_people("message_methods", () => {
|
||||
"https://secure.gravatar.com/avatar/6dbdd7946b58d8b11351fcb27e5cdd55?d=identicon&s=50",
|
||||
);
|
||||
|
||||
assert.deepEqual(people.sender_info_with_small_avatar_urls_for_sender_ids([30]), [
|
||||
assert.deepEqual(people.sender_info_for_recent_topics_row([30]), [
|
||||
{
|
||||
avatar_url_small: "/avatar/30&s=50",
|
||||
email: "me@example.com",
|
||||
|
||||
@@ -166,7 +166,7 @@ const people = zrequire("people");
|
||||
const rt = zrequire("recent_topics");
|
||||
|
||||
people.is_my_user_id = (id) => id === 1;
|
||||
people.sender_info_with_small_avatar_urls_for_sender_ids = (ids) => ids;
|
||||
people.sender_info_for_recent_topics_row = (ids) => ids;
|
||||
|
||||
let id = 0;
|
||||
|
||||
|
||||
@@ -657,7 +657,7 @@ export function small_avatar_url_for_person(person) {
|
||||
return format_small_avatar_url("/avatar/" + person.user_id);
|
||||
}
|
||||
|
||||
export function sender_info_with_small_avatar_urls_for_sender_ids(sender_ids) {
|
||||
export function sender_info_for_recent_topics_row(sender_ids) {
|
||||
const senders_info = [];
|
||||
for (const id of sender_ids) {
|
||||
const sender = {...get_by_user_id(id)};
|
||||
|
||||
@@ -315,7 +315,7 @@ function format_topic(topic_data) {
|
||||
// Display in most recent sender first order
|
||||
const all_senders = recent_senders.get_topic_recent_senders(stream_id, topic);
|
||||
const senders = all_senders.slice(-MAX_AVATAR);
|
||||
const senders_info = people.sender_info_with_small_avatar_urls_for_sender_ids(senders);
|
||||
const senders_info = people.sender_info_for_recent_topics_row(senders);
|
||||
|
||||
return {
|
||||
// stream info
|
||||
|
||||
Reference in New Issue
Block a user