This commit adds non-archived group messages and `group_message_summary` notifications in the messages tab in the user menu. With this change, the messages tab in the user menu now includes 3 types of items: 1. Unread `private_message` notifications (notifications when you receive a reply in a PM) 2. Unread and read `group_message_summary` notifications (notifications when there's a new message in a group inbox that you track) 3. Non-archived personal and group messages Unread `private_message` notifications are always shown first, followed by unread `group_message_summary` notifications, and then everything else (messages and read `group_message_summary` notifications) sorted by recency (most recent first). Internal topic: t/72976.
144 lines
4.0 KiB
JavaScript
144 lines
4.0 KiB
JavaScript
export default {
|
|
"/u/:username/user-menu-bookmarks": {
|
|
notifications: [
|
|
{
|
|
id: 1713,
|
|
user_id: 1,
|
|
notification_type: 24,
|
|
read: false,
|
|
high_priority: true,
|
|
created_at: "2022-08-05T17:27:24.873Z",
|
|
post_number: 1,
|
|
topic_id: 249,
|
|
fancy_title: "Test event hello world!",
|
|
slug: "test-event-hello-world",
|
|
data: {
|
|
title: "Test event hello world!",
|
|
bookmarkable_url: "/t/test-event-hello-world/249/1",
|
|
display_username: "osama",
|
|
bookmark_name: "",
|
|
bookmark_id: 11,
|
|
},
|
|
},
|
|
],
|
|
bookmarks: [
|
|
{
|
|
id: 6,
|
|
created_at: "2022-08-05T06:09:39.559Z",
|
|
updated_at: "2022-08-05T06:11:27.246Z",
|
|
name: "",
|
|
reminder_at: "2022-08-05T06:10:42.223Z",
|
|
reminder_at_ics_start: "20220805T061042Z",
|
|
reminder_at_ics_end: "20220805T071042Z",
|
|
pinned: false,
|
|
title: "Test poll topic hello world",
|
|
fancy_title: "Test poll topic hello world",
|
|
excerpt: "poll",
|
|
bookmarkable_id: 1009,
|
|
bookmarkable_type: "Post",
|
|
bookmarkable_url:
|
|
"http://localhost:4200/t/test-poll-topic-hello-world/227/1",
|
|
tags: [],
|
|
tags_descriptions: {},
|
|
truncated: true,
|
|
topic_id: 227,
|
|
linked_post_number: 1,
|
|
deleted: false,
|
|
hidden: false,
|
|
category_id: 1,
|
|
closed: false,
|
|
archived: false,
|
|
archetype: "regular",
|
|
highest_post_number: 1,
|
|
last_read_post_number: 1,
|
|
bumped_at: "2022-04-21T15:14:37.359Z",
|
|
slug: "test-poll-topic-hello-world",
|
|
user: {
|
|
id: 1,
|
|
username: "osama",
|
|
name: "Osama",
|
|
avatar_template:
|
|
"/letter_avatar_proxy/v4/letter/o/f05b48/{size}.png",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"/u/:username/user-menu-private-messages": {
|
|
unread_notifications: [
|
|
{
|
|
id: 8315,
|
|
user_id: 1,
|
|
notification_type: 6,
|
|
read: false,
|
|
high_priority: true,
|
|
created_at: "2022-08-05T17:27:24.873Z",
|
|
post_number: 1,
|
|
topic_id: 249,
|
|
fancy_title: "Very secret message!",
|
|
slug: "very-secret-message",
|
|
data: {
|
|
topic_title: "very secret message!",
|
|
original_post_id: 1043,
|
|
original_post_type: 1,
|
|
original_username: "osama",
|
|
revision_number: null,
|
|
display_username: "osama"
|
|
},
|
|
},
|
|
],
|
|
topics: [
|
|
{
|
|
id: 8092,
|
|
title: "BUG: Can not render emoji properly :/",
|
|
fancy_title: "BUG: Can not render emoji properly :confused:",
|
|
slug: "bug-can-not-render-emoji-properly",
|
|
posts_count: 1,
|
|
reply_count: 0,
|
|
highest_post_number: 2,
|
|
image_url: null,
|
|
created_at: "2019-07-26T01:29:24.008Z",
|
|
last_posted_at: "2019-07-26T01:29:24.177Z",
|
|
bumped: true,
|
|
bumped_at: "2019-07-26T01:29:24.177Z",
|
|
unseen: false,
|
|
last_read_post_number: 2,
|
|
unread_posts: 0,
|
|
pinned: false,
|
|
unpinned: null,
|
|
visible: true,
|
|
closed: false,
|
|
archived: false,
|
|
notification_level: 3,
|
|
bookmarked: false,
|
|
bookmarks: [],
|
|
liked: false,
|
|
views: 5,
|
|
like_count: 0,
|
|
has_summary: false,
|
|
archetype: "private_message",
|
|
last_poster_username: "mixtape",
|
|
category_id: null,
|
|
pinned_globally: false,
|
|
featured_link: null,
|
|
posters: [
|
|
{
|
|
extras: "latest single",
|
|
description: "Original Poster, Most Recent Poster",
|
|
user_id: 13,
|
|
primary_group_id: null,
|
|
},
|
|
],
|
|
participants: [
|
|
{
|
|
extras: "latest",
|
|
description: null,
|
|
user_id: 13,
|
|
primary_group_id: null,
|
|
},
|
|
],
|
|
}
|
|
],
|
|
read_notifications: [],
|
|
}
|
|
}
|