discourse/plugins/discourse-reactions/test/javascripts/fixtures/reactions-topic-fixtures.js
2025-07-10 11:40:31 +01:00

819 lines
22 KiB
JavaScript
Vendored

export default {
"/t/374.json": {
post_stream: {
posts: [
{
id: 854,
name: "Ahmed Gagan",
username: "ahmedgagan6",
avatar_template: "/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
created_at: "2021-03-10T20:35:28.721Z",
cooked: "<p>This is a test topic</p>",
post_number: 1,
post_type: 1,
updated_at: "2021-03-10T21:16:11.840Z",
reply_count: 0,
reply_to_post_number: null,
quote_count: 0,
incoming_link_count: 0,
reads: 4,
readers_count: 3,
score: 2850.8,
yours: true,
topic_id: 374,
topic_slug: "discourse-reactions-beyond-likes",
display_username: "Ahmed Gagan",
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_bg_color: null,
primary_group_flair_color: null,
version: 3,
can_edit: true,
can_delete: false,
can_recover: false,
can_wiki: true,
link_counts: [
{
url: "/groups/team",
internal: true,
reflection: false,
clicks: 0,
},
{
url: "https://meta.discourse.org/t/install-plugins-in-discourse/19157",
internal: false,
reflection: false,
title: "Install Plugins in Discourse - admins - Discourse Meta",
clicks: 0,
},
{
url: "https://github.com/discourse/discourse-reactions",
internal: false,
reflection: false,
title: "GitHub - discourse/discourse-reactions",
clicks: 0,
},
],
read: true,
user_title: "team",
title_is_group: false,
bookmarked: false,
actions_summary: [
{
id: 2,
count: 190,
},
{
id: 3,
can_act: true,
},
{
id: 4,
can_act: true,
},
{
id: 8,
can_act: true,
},
{
id: 7,
can_act: true,
},
],
moderator: false,
admin: true,
staff: true,
user_id: 1,
hidden: false,
trust_level: 2,
deleted_at: null,
user_deleted: false,
edit_reason: null,
can_view_edit_history: true,
wiki: false,
reviewable_id: 0,
reviewable_score_count: 0,
reviewable_score_pending_count: 0,
reactions: [
{
id: "heart",
type: "emoji",
count: 190,
},
{
id: "angry",
type: "emoji",
count: 5,
},
{
id: "laughing",
type: "emoji",
count: 5,
},
{
id: "open_mouth",
type: "emoji",
count: 3,
},
{
id: "cry",
type: "emoji",
count: 2,
},
{
id: "thumbsdown",
type: "emoji",
count: 2,
},
{
id: "nose:t2",
type: "emoji",
count: 1,
},
{
id: "thumbsup",
type: "emoji",
count: 1,
},
],
current_user_reaction: null,
reaction_users_count: 209,
current_user_used_main_reaction: false,
},
{
id: 1076,
name: "Sam Saffron",
username: "sam",
avatar_template: "/user_avatar/localhost/sam/{size}/5_2.png",
created_at: "2021-03-10T21:40:09.152Z",
cooked:
'<p>This looks pretty cool <img src="//localhost:3000/images/emoji/twitter/star_struck.png?v=9" title=":star_struck:" class="emoji" alt=":star_struck:"></p>',
post_number: 2,
post_type: 1,
updated_at: "2021-03-10T21:40:09.152Z",
reply_count: 0,
reply_to_post_number: null,
quote_count: 0,
incoming_link_count: 0,
reads: 4,
readers_count: 3,
score: 15.8,
yours: false,
topic_id: 374,
topic_slug: "discourse-reactions-beyond-likes",
display_username: "Sam Saffron",
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_bg_color: null,
primary_group_flair_color: null,
version: 1,
can_edit: true,
can_delete: true,
can_recover: false,
can_wiki: true,
read: true,
user_title: "Leader",
title_is_group: false,
bookmarked: false,
actions_summary: [
{
id: 2,
count: 1,
can_act: true,
},
{
id: 3,
can_act: true,
},
{
id: 4,
can_act: true,
},
{
id: 8,
can_act: true,
},
{
id: 6,
can_act: true,
},
{
id: 7,
can_act: true,
},
],
moderator: false,
admin: false,
staff: false,
user_id: 3,
hidden: false,
trust_level: 4,
deleted_at: null,
user_deleted: false,
edit_reason: null,
can_view_edit_history: true,
wiki: false,
notice: {
type: "returning_user",
last_posted_at: "2020-09-14T19:49:25Z",
},
reviewable_id: 0,
reviewable_score_count: 0,
reviewable_score_pending_count: 0,
reactions: [
{
id: "heart",
type: "emoji",
count: 1,
},
],
current_user_reaction: null,
reaction_users_count: 1,
current_user_used_main_reaction: false,
},
{
id: 1078,
name: "Joffrey Jaffeux",
username: "joffreyjaffeux",
avatar_template:
"/user_avatar/localhost/joffreyjaffeux/{size}/11_2.png",
created_at: "2021-03-10T21:50:09.280Z",
cooked:
'<p>Thanks, this a great plugin <img src="//localhost:3000/images/emoji/twitter/heart_eyes.png?v=9" title=":heart_eyes:" class="emoji" alt=":heart_eyes:"></p>',
post_number: 3,
post_type: 1,
updated_at: "2021-03-10T21:50:09.280Z",
reply_count: 0,
reply_to_post_number: null,
quote_count: 0,
incoming_link_count: 0,
reads: 4,
readers_count: 3,
score: 60.8,
yours: false,
topic_id: 374,
topic_slug: "discourse-reactions-beyond-likes",
display_username: "Joffrey Jaffeux",
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_bg_color: null,
primary_group_flair_color: null,
version: 1,
can_edit: true,
can_delete: true,
can_recover: false,
can_wiki: true,
read: true,
user_title: "team",
title_is_group: false,
bookmarked: false,
actions_summary: [
{
id: 2,
count: 2,
acted: true,
can_undo: true,
},
{
id: 3,
can_act: true,
},
{
id: 4,
can_act: true,
},
{
id: 8,
can_act: true,
},
{
id: 6,
can_act: true,
},
{
id: 7,
can_act: true,
},
],
moderator: false,
admin: false,
staff: false,
user_id: 4,
hidden: false,
trust_level: 0,
deleted_at: null,
user_deleted: false,
edit_reason: null,
can_view_edit_history: true,
wiki: false,
notice: {
type: "returning_user",
last_posted_at: "2020-05-03T22:26:04Z",
},
reviewable_id: 0,
reviewable_score_count: 0,
reviewable_score_pending_count: 0,
reactions: [
{
id: "heart",
type: "emoji",
count: 2,
},
],
current_user_reaction: {
id: "heart",
type: "emoji",
can_undo: true,
},
reaction_users_count: 2,
current_user_used_main_reaction: true,
},
{
id: 1079,
name: "David Tylor",
username: "david",
avatar_template: "/user_avatar/localhost/david/{size}/7_2.png",
created_at: "2021-03-10T21:54:50.134Z",
cooked:
'\u003cp\u003eReally liking this plugin \u003cimg src="//localhost:3000/images/emoji/twitter/open_hands.png?v=9" title=":open_hands:" class="emoji" alt=":open_hands:"\u003e\u003c/p\u003e',
post_number: 4,
post_type: 1,
updated_at: "2021-03-10T21:54:50.134Z",
reply_count: 0,
reply_to_post_number: null,
quote_count: 0,
incoming_link_count: 0,
reads: 4,
readers_count: 3,
score: 60.8,
yours: false,
topic_id: 374,
topic_slug: "discourse-reactions-beyond-likes",
display_username: "David Tylor",
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_bg_color: null,
primary_group_flair_color: null,
version: 1,
can_edit: true,
can_delete: true,
can_recover: true,
can_wiki: true,
read: true,
user_title: "team",
title_is_group: false,
bookmarked: false,
actions_summary: [
{ id: 3, can_act: true },
{ id: 4, can_act: true },
{ id: 8, can_act: true },
{ id: 6, can_act: true },
{ id: 7, can_act: true },
],
moderator: true,
admin: false,
staff: true,
user_id: 2,
hidden: false,
trust_level: 0,
deleted_at: "2021-04-08T07:51:23.620Z",
deleted_by: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
user_deleted: false,
edit_reason: null,
can_view_edit_history: true,
wiki: false,
user_custom_fields: { user_notes_count: "1" },
reviewable_id: 0,
reviewable_score_count: 0,
reviewable_score_pending_count: 0,
reactions: [],
current_user_reaction: null,
reaction_users_count: 0,
current_user_used_main_reaction: false,
},
],
stream: [854, 1076, 1078, 1079],
},
timeline_lookup: [[1, 26]],
suggested_topics: [
{
id: 24,
title: "Custom Trust Levels",
fancy_title: "Custom Trust Levels",
slug: "custom-trust-levels",
posts_count: 4,
reply_count: 0,
highest_post_number: 8,
image_url: null,
created_at: "2020-04-08T10:56:18.795Z",
last_posted_at: "2020-06-22T09:41:47.879Z",
bumped: true,
bumped_at: "2020-05-07T20:43:02.233Z",
archetype: "regular",
unseen: false,
last_read_post_number: 8,
unread: 0,
new_posts: 0,
pinned: false,
unpinned: null,
visible: true,
closed: false,
archived: false,
notification_level: 3,
bookmarked: false,
liked: false,
tags: [],
like_count: 2,
views: 22,
category_id: 2,
featured_link: null,
posters: [
{
extras: "latest single",
description: "Original Poster, Most Recent Poster",
user: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
},
],
},
{
id: 74,
title: "This post is to be deleted in a while",
fancy_title: "This post is to be deleted in a while",
slug: "this-post-is-to-be-deleted-in-a-while",
posts_count: 4,
reply_count: 0,
highest_post_number: 5,
image_url: null,
created_at: "2020-06-10T08:17:45.876Z",
last_posted_at: "2020-06-22T09:40:28.704Z",
bumped: true,
bumped_at: "2020-06-10T08:17:46.566Z",
archetype: "regular",
unseen: false,
last_read_post_number: 5,
unread: 0,
new_posts: 0,
pinned: false,
unpinned: null,
visible: true,
closed: false,
archived: false,
notification_level: 3,
bookmarked: false,
liked: false,
tags: [],
like_count: 0,
views: 6,
category_id: 1,
featured_link: null,
posters: [
{
extras: "latest single",
description: "Original Poster, Most Recent Poster",
user: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
},
],
},
{
id: 100,
title: "topic title22",
fancy_title: "topic title22",
slug: "topic-title22",
posts_count: 2,
reply_count: 0,
highest_post_number: 2,
image_url: null,
created_at: "2020-06-22T10:05:14.702Z",
last_posted_at: "2020-06-22T10:09:04.325Z",
bumped: true,
bumped_at: "2020-06-22T10:05:14.987Z",
archetype: "regular",
unseen: false,
last_read_post_number: 2,
unread: 0,
new_posts: 0,
pinned: false,
unpinned: null,
visible: true,
closed: false,
archived: false,
notification_level: 2,
bookmarked: false,
liked: false,
tags: [],
like_count: 0,
views: 1,
category_id: 1,
featured_link: null,
posters: [
{
extras: null,
description: "Original Poster",
user: {
id: -1,
username: "system",
name: "system",
avatar_template: "/images/discourse-logo-sketch-small.png",
},
},
{
extras: "latest",
description: "Most Recent Poster",
user: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
},
],
},
{
id: 115,
title: "topic title37",
fancy_title: "topic title37",
slug: "topic-title37",
posts_count: 4,
reply_count: 0,
highest_post_number: 4,
image_url: null,
created_at: "2020-06-22T10:05:23.201Z",
last_posted_at: "2020-06-22T12:26:23.978Z",
bumped: true,
bumped_at: "2020-06-22T10:05:23.432Z",
archetype: "regular",
unseen: false,
last_read_post_number: 4,
unread: 0,
new_posts: 0,
pinned: false,
unpinned: null,
visible: true,
closed: false,
archived: false,
notification_level: 3,
bookmarked: false,
liked: false,
tags: [],
like_count: 0,
views: 2,
category_id: 1,
featured_link: null,
posters: [
{
extras: null,
description: "Original Poster",
user: {
id: -1,
username: "system",
name: "system",
avatar_template: "/images/discourse-logo-sketch-small.png",
},
},
{
extras: "latest",
description: "Most Recent Poster",
user: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
},
],
},
{
id: 122,
title: "topic title44",
fancy_title: "topic title44",
slug: "topic-title44",
posts_count: 4,
reply_count: 0,
highest_post_number: 6,
image_url: null,
created_at: "2020-06-22T10:05:27.004Z",
last_posted_at: "2020-06-22T12:24:34.727Z",
bumped: true,
bumped_at: "2020-06-22T10:05:27.269Z",
archetype: "regular",
unseen: false,
last_read_post_number: 6,
unread: 0,
new_posts: 0,
pinned: false,
unpinned: null,
visible: true,
closed: false,
archived: false,
notification_level: 3,
bookmarked: false,
liked: false,
tags: [],
like_count: 0,
views: 4,
category_id: 1,
featured_link: null,
posters: [
{
extras: null,
description: "Original Poster",
user: {
id: -1,
username: "system",
name: "system",
avatar_template: "/images/discourse-logo-sketch-small.png",
},
},
{
extras: "latest",
description: "Most Recent Poster",
user: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template:
"/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
},
],
},
],
tags: [],
id: 374,
title: "Discourse reactions - Beyond likes",
fancy_title: "Discourse reactions - Beyond likes",
posts_count: 4,
created_at: "2021-03-10T20:35:28.349Z",
views: 36,
reply_count: 0,
like_count: 195,
last_posted_at: "2021-03-10T21:54:50.134Z",
visible: true,
closed: false,
archived: false,
has_summary: false,
archetype: "regular",
slug: "discourse-reactions-beyond-likes",
category_id: 9,
word_count: 514,
deleted_at: null,
user_id: 1,
featured_link: null,
pinned_globally: false,
pinned_at: null,
pinned_until: null,
image_url: null,
slow_mode_seconds: 0,
draft: null,
draft_key: "topic_374",
draft_sequence: 8,
posted: true,
unpinned: null,
pinned: false,
current_post_number: 1,
highest_post_number: 4,
last_read_post_number: 4,
last_read_post_id: 1079,
deleted_by: null,
has_deleted: false,
actions_summary: [
{
id: 4,
count: 0,
hidden: false,
can_act: true,
},
{
id: 8,
count: 0,
hidden: false,
can_act: true,
},
{
id: 7,
count: 0,
hidden: false,
can_act: true,
},
],
chunk_size: 20,
bookmarked: false,
topic_timer: null,
message_bus_last_id: 440,
participant_count: 4,
show_read_indicator: false,
thumbnails: null,
valid_reactions: [
"heart",
"laughing",
"open_mouth",
"cry",
"angry",
"thumbsup",
"thumbsdown",
"nose:t2",
],
details: {
can_edit: true,
notification_level: 3,
notifications_reason_id: 1,
can_move_posts: true,
can_delete: true,
can_remove_allowed_users: true,
can_invite_to: true,
can_invite_via_email: true,
can_create_post: true,
can_reply_as_new_topic: true,
can_flag_topic: true,
can_convert_topic: true,
can_review_topic: true,
can_close_topic: true,
can_archive_topic: true,
can_split_merge_topic: true,
can_edit_staff_notes: true,
can_toggle_topic_visibility: true,
can_pin_unpin_topic: true,
can_moderate_category: true,
can_remove_self_id: 1,
participants: [
{
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template: "/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
post_count: 1,
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_color: null,
primary_group_flair_bg_color: null,
},
{
id: 2,
username: "david",
name: "David Tylor",
avatar_template: "/user_avatar/localhost/david/{size}/7_2.png",
post_count: 1,
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_color: null,
primary_group_flair_bg_color: null,
},
{
id: 3,
username: "sam",
name: "Sam Saffron",
avatar_template: "/user_avatar/localhost/sam/{size}/5_2.png",
post_count: 1,
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_color: null,
primary_group_flair_bg_color: null,
},
{
id: 4,
username: "joffreyjaffeux",
name: "Joffrey Jaffeux",
avatar_template:
"/user_avatar/localhost/joffreyjaffeux/{size}/11_2.png",
post_count: 1,
primary_group_name: null,
primary_group_flair_url: null,
primary_group_flair_color: null,
primary_group_flair_bg_color: null,
},
],
created_by: {
id: 1,
username: "ahmedgagan6",
name: "Ahmed Gagan",
avatar_template: "/user_avatar/localhost/ahmedgagan6/{size}/4_2.png",
},
last_poster: {
id: 2,
username: "david",
name: "David Tylor",
avatar_template: "/user_avatar/localhost/david/{size}/7_2.png",
},
},
},
};