2020-08-01 03:43:15 +02:00
|
|
|
"use strict";
|
|
|
|
|
2020-08-18 15:29:16 +02:00
|
|
|
// These events are not guaranteed to be perfectly
|
|
|
|
// representative of what the server sends. We
|
2021-01-20 19:39:32 +01:00
|
|
|
// have a tool called check-schemas that tries
|
2020-08-18 15:29:16 +02:00
|
|
|
// to validate this data against server side schemas,
|
|
|
|
// but there are certain edge cases that the tool now
|
|
|
|
// skips. And even when the data matches the schema,
|
|
|
|
// it may not be completely representative.
|
2020-06-12 20:26:04 +02:00
|
|
|
|
2020-08-18 15:32:33 +02:00
|
|
|
const test_user = {
|
2020-07-15 01:29:15 +02:00
|
|
|
email: "test@example.com",
|
2020-06-12 20:26:04 +02:00
|
|
|
user_id: 101,
|
2020-07-15 01:29:15 +02:00
|
|
|
full_name: "Test User",
|
2020-06-12 20:26:04 +02:00
|
|
|
};
|
2020-08-18 15:32:33 +02:00
|
|
|
exports.test_user = test_user;
|
2020-06-12 20:26:04 +02:00
|
|
|
|
|
|
|
exports.test_message = {
|
2020-08-18 15:32:33 +02:00
|
|
|
sender_id: test_user.user_id,
|
2020-06-12 20:26:04 +02:00
|
|
|
id: 99,
|
|
|
|
};
|
|
|
|
|
2020-07-25 22:58:18 +02:00
|
|
|
const typing_person1 = {
|
|
|
|
user_id: 1,
|
|
|
|
email: "user1@example.com",
|
|
|
|
};
|
|
|
|
|
|
|
|
const typing_person2 = {
|
|
|
|
user_id: 2,
|
|
|
|
email: "user2@example.com",
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.typing_person1 = typing_person1;
|
|
|
|
exports.typing_person2 = typing_person2;
|
2021-01-04 16:21:54 +01:00
|
|
|
exports.stream_typing_in_id = 1;
|
|
|
|
exports.topic_typing_in = "Typing topic";
|
2020-07-25 22:58:18 +02:00
|
|
|
|
2020-08-06 13:51:44 +02:00
|
|
|
const fake_then = 1596710000;
|
2020-08-06 13:45:36 +02:00
|
|
|
const fake_now = 1596713966;
|
|
|
|
|
2020-08-01 17:02:51 +02:00
|
|
|
exports.test_streams = {
|
2020-07-25 22:33:03 +02:00
|
|
|
devel: {
|
|
|
|
name: "devel",
|
|
|
|
description: ":devel fun:",
|
|
|
|
rendered_description: "<b>devel fun</b>",
|
|
|
|
invite_only: false,
|
|
|
|
stream_id: 101,
|
2020-08-06 13:51:44 +02:00
|
|
|
date_created: fake_now,
|
2020-07-25 22:33:03 +02:00
|
|
|
first_message_id: 1,
|
|
|
|
history_public_to_subscribers: false,
|
|
|
|
is_announcement_only: false,
|
|
|
|
is_web_public: false,
|
|
|
|
message_retention_days: null,
|
|
|
|
stream_post_policy: 1,
|
2023-07-12 12:57:57 +02:00
|
|
|
can_remove_subscribers_group: 2,
|
2020-07-25 22:33:03 +02:00
|
|
|
},
|
|
|
|
test: {
|
|
|
|
name: "test",
|
|
|
|
description: "test desc",
|
|
|
|
rendered_description: "test desc",
|
|
|
|
invite_only: true,
|
|
|
|
stream_id: 102,
|
2020-08-06 13:51:44 +02:00
|
|
|
date_created: fake_then,
|
2020-07-25 22:33:03 +02:00
|
|
|
first_message_id: 1,
|
|
|
|
history_public_to_subscribers: false,
|
|
|
|
is_web_public: false,
|
|
|
|
is_announcement_only: false,
|
|
|
|
message_retention_days: null,
|
|
|
|
stream_post_policy: 1,
|
2023-07-12 12:57:57 +02:00
|
|
|
can_remove_subscribers_group: 2,
|
2020-07-25 22:33:03 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-08-01 17:02:51 +02:00
|
|
|
const streams = exports.test_streams;
|
|
|
|
|
2021-06-09 13:31:39 +02:00
|
|
|
// TODO: we want to validate this better with check-schema.
|
|
|
|
// The data should mostly be representative here, but we don't
|
|
|
|
// really exercise it in our tests yet.
|
|
|
|
const message_detail = {
|
|
|
|
type: "stream",
|
|
|
|
mentioned: false,
|
|
|
|
sender_id: test_user.id,
|
|
|
|
stream_id: streams.devel.test_id,
|
|
|
|
};
|
|
|
|
|
2020-08-05 19:04:27 +02:00
|
|
|
exports.test_realm_emojis = {
|
|
|
|
101: {
|
|
|
|
id: "101",
|
|
|
|
name: "spain",
|
2021-08-12 10:20:50 +02:00
|
|
|
source_url: "/some/path/to/spain.gif",
|
|
|
|
still_url: "/some/path/to/spain.png",
|
2020-08-05 19:04:27 +02:00
|
|
|
deactivated: false,
|
2020-08-18 15:36:30 +02:00
|
|
|
author_id: test_user.user_id,
|
2020-08-05 19:04:27 +02:00
|
|
|
},
|
|
|
|
102: {
|
|
|
|
id: "102",
|
|
|
|
name: "green_tick",
|
|
|
|
author_id: 222,
|
|
|
|
deactivated: false,
|
|
|
|
source_url: "/some/path/to/emoji",
|
2021-12-29 16:16:15 +01:00
|
|
|
still_url: null,
|
2020-08-05 19:04:27 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
exports.fixtures = {
|
|
|
|
alert_words: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "alert_words",
|
|
|
|
alert_words: ["fire", "lunch"],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-08-05 19:04:42 +02:00
|
|
|
attachment__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "attachment",
|
2020-08-05 19:04:42 +02:00
|
|
|
op: "add",
|
2020-08-06 13:45:36 +02:00
|
|
|
attachment: {
|
|
|
|
id: 99,
|
|
|
|
name: "foo.png",
|
|
|
|
size: 4096,
|
|
|
|
path_id: "path_id",
|
|
|
|
create_time: fake_now,
|
|
|
|
messages: [
|
|
|
|
{
|
|
|
|
id: 1000,
|
|
|
|
date_sent: fake_now,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
upload_space_used: 90000,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2021-03-26 09:51:43 +01:00
|
|
|
custom_profile_fields: {
|
2020-07-29 14:05:55 +02:00
|
|
|
type: "custom_profile_fields",
|
|
|
|
fields: [
|
2022-08-17 14:16:15 +02:00
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
name: "teams",
|
|
|
|
type: 1,
|
|
|
|
hint: "",
|
|
|
|
field_data: "",
|
|
|
|
order: 1,
|
|
|
|
display_in_profile_summary: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
name: "hobbies",
|
|
|
|
type: 1,
|
|
|
|
hint: "",
|
|
|
|
field_data: "",
|
|
|
|
order: 2,
|
|
|
|
display_in_profile_summary: false,
|
|
|
|
},
|
2020-07-29 14:05:55 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
default_streams: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "default_streams",
|
2020-07-25 22:33:03 +02:00
|
|
|
default_streams: [streams.devel, streams.test],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 14:05:55 +02:00
|
|
|
delete_message: {
|
|
|
|
type: "delete_message",
|
|
|
|
message_ids: [1337],
|
|
|
|
message_type: "stream",
|
|
|
|
stream_id: 99,
|
|
|
|
topic: "topic1",
|
|
|
|
},
|
|
|
|
|
2020-08-16 17:17:46 +02:00
|
|
|
has_zoom_token: {
|
|
|
|
type: "has_zoom_token",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
invites_changed: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "invites_changed",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2021-03-27 12:42:16 +01:00
|
|
|
muted_users: {
|
|
|
|
type: "muted_users",
|
|
|
|
muted_users: [
|
|
|
|
{
|
|
|
|
id: 5,
|
|
|
|
timestamp: fake_then,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 23,
|
|
|
|
timestamp: fake_now,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2023-12-02 11:30:35 +01:00
|
|
|
onboarding_steps: {
|
|
|
|
type: "onboarding_steps",
|
|
|
|
onboarding_steps: [
|
|
|
|
{
|
|
|
|
type: "hotspot",
|
|
|
|
name: "topics",
|
|
|
|
title: "About topics",
|
|
|
|
description: "Topics are good.",
|
|
|
|
delay: 1.5,
|
|
|
|
has_trigger: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "hotspot",
|
|
|
|
name: "compose",
|
|
|
|
title: "Compose box",
|
|
|
|
description: "This is where you compose messages.",
|
|
|
|
delay: 3.14159,
|
|
|
|
has_trigger: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
presence: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "presence",
|
|
|
|
email: "alice@example.com",
|
2020-06-12 20:26:04 +02:00
|
|
|
user_id: 42,
|
|
|
|
presence: {
|
2020-08-13 20:21:54 +02:00
|
|
|
electron: {
|
|
|
|
status: "active",
|
|
|
|
timestamp: fake_now,
|
|
|
|
client: "electron",
|
|
|
|
pushable: false,
|
|
|
|
},
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
2020-08-06 13:51:44 +02:00
|
|
|
server_timestamp: fake_now,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
reaction__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "reaction",
|
|
|
|
op: "add",
|
2020-06-12 20:26:04 +02:00
|
|
|
message_id: 128,
|
2020-08-17 15:28:17 +02:00
|
|
|
reaction_type: "unicode_emoji",
|
|
|
|
emoji_name: "airplane",
|
|
|
|
emoji_code: "2708",
|
2020-08-18 15:32:33 +02:00
|
|
|
user_id: test_user.user_id,
|
2020-06-12 20:26:04 +02:00
|
|
|
user: {
|
2020-08-18 15:32:33 +02:00
|
|
|
email: test_user.email,
|
|
|
|
full_name: test_user.full_name,
|
|
|
|
user_id: test_user.user_id,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
reaction__remove: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "reaction",
|
|
|
|
op: "remove",
|
2020-06-12 20:26:04 +02:00
|
|
|
message_id: 256,
|
2020-08-17 15:28:17 +02:00
|
|
|
reaction_type: "unicode_emoji",
|
|
|
|
emoji_name: "8ball",
|
|
|
|
emoji_code: "1f3b1",
|
2020-08-18 15:32:33 +02:00
|
|
|
user_id: test_user.user_id,
|
2020-06-12 20:26:04 +02:00
|
|
|
user: {
|
2020-08-18 15:32:33 +02:00
|
|
|
email: test_user.email,
|
|
|
|
full_name: test_user.full_name,
|
|
|
|
user_id: test_user.user_id,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-07-29 14:05:55 +02:00
|
|
|
realm__deactivated: {
|
|
|
|
type: "realm",
|
|
|
|
op: "deactivated",
|
2021-03-13 20:00:05 +01:00
|
|
|
realm_id: 2,
|
2020-07-29 14:05:55 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__bot_creation_policy: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "bot_creation_policy",
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
|
2021-03-27 05:48:37 +01:00
|
|
|
realm__update__create_private_stream_policy: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2021-03-27 05:48:37 +01:00
|
|
|
property: "create_private_stream_policy",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
|
|
|
realm__update__create_public_stream_policy: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "create_public_stream_policy",
|
2020-06-12 20:26:04 +02:00
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
2021-11-24 15:29:25 +01:00
|
|
|
realm__update__create_web_public_stream_policy: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "create_web_public_stream_policy",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__default_code_block_language: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "default_code_block_language",
|
|
|
|
value: "javascript",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__disallow_disposable_email_addresses: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "disallow_disposable_email_addresses",
|
|
|
|
value: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__emails_restricted_to_domains: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "emails_restricted_to_domains",
|
|
|
|
value: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2021-11-24 19:23:52 +01:00
|
|
|
realm__update__enable_spectator_access: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "enable_spectator_access",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__invite_required: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "invite_required",
|
|
|
|
value: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2021-04-04 15:47:33 +02:00
|
|
|
realm__update__invite_to_realm_policy: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "invite_to_realm_policy",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__invite_to_stream_policy: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "invite_to_stream_policy",
|
|
|
|
value: 2,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__name: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
2020-07-29 13:19:47 +02:00
|
|
|
property: "name",
|
|
|
|
value: "new_realm_name",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__notifications_stream_id: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "notifications_stream_id",
|
2020-06-12 20:26:04 +02:00
|
|
|
value: 42,
|
|
|
|
},
|
|
|
|
|
2022-04-12 17:41:07 +02:00
|
|
|
realm__update__org_type: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "org_type",
|
|
|
|
value: 50,
|
|
|
|
},
|
|
|
|
|
2020-07-29 13:19:47 +02:00
|
|
|
realm__update__signup_notifications_stream_id: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "signup_notifications_stream_id",
|
2020-06-12 20:26:04 +02:00
|
|
|
value: 41,
|
|
|
|
},
|
|
|
|
|
2022-04-22 18:45:30 +02:00
|
|
|
realm__update__want_advertise_in_communities_directory: {
|
|
|
|
type: "realm",
|
|
|
|
op: "update",
|
|
|
|
property: "want_advertise_in_communities_directory",
|
|
|
|
value: false,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
realm__update_dict__default: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update_dict",
|
|
|
|
property: "default",
|
2020-06-12 20:26:04 +02:00
|
|
|
data: {
|
|
|
|
allow_message_editing: true,
|
|
|
|
message_content_edit_limit_seconds: 5,
|
2023-01-31 11:25:33 +01:00
|
|
|
edit_topic_policy: 4,
|
2023-08-03 16:06:40 +02:00
|
|
|
create_multiuse_invite_group: 3,
|
2020-06-12 20:26:04 +02:00
|
|
|
authentication_methods: {
|
|
|
|
Google: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm__update_dict__icon: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update_dict",
|
|
|
|
property: "icon",
|
2020-06-12 20:26:04 +02:00
|
|
|
data: {
|
2020-07-15 01:29:15 +02:00
|
|
|
icon_url: "icon.png",
|
|
|
|
icon_source: "U",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm__update_dict__logo: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update_dict",
|
|
|
|
property: "logo",
|
2020-06-12 20:26:04 +02:00
|
|
|
data: {
|
2020-07-15 01:29:15 +02:00
|
|
|
logo_url: "logo.png",
|
|
|
|
logo_source: "U",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm__update_dict__night_logo: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm",
|
|
|
|
op: "update_dict",
|
|
|
|
property: "night_logo",
|
2020-06-12 20:26:04 +02:00
|
|
|
data: {
|
2020-07-15 01:29:15 +02:00
|
|
|
night_logo_url: "night_logo.png",
|
|
|
|
night_logo_source: "U",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm_bot__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_bot",
|
|
|
|
op: "add",
|
2020-06-12 20:26:04 +02:00
|
|
|
bot: {
|
2020-07-15 01:29:15 +02:00
|
|
|
email: "the-bot@example.com",
|
2020-07-25 22:09:04 +02:00
|
|
|
user_id: 42,
|
|
|
|
avatar_url: "/some/path/to/avatar",
|
|
|
|
api_key: "SOME_KEY",
|
2020-07-15 01:29:15 +02:00
|
|
|
full_name: "The Bot",
|
2020-07-25 22:09:04 +02:00
|
|
|
bot_type: 1,
|
|
|
|
default_all_public_streams: true,
|
|
|
|
default_events_register_stream: "whatever",
|
|
|
|
default_sending_stream: "whatever",
|
|
|
|
is_active: true,
|
2020-08-18 15:32:33 +02:00
|
|
|
owner_id: test_user.user_id,
|
2020-07-25 22:09:04 +02:00
|
|
|
services: [],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-07-29 14:05:55 +02:00
|
|
|
realm_bot__delete: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_bot",
|
2020-07-29 14:05:55 +02:00
|
|
|
op: "delete",
|
2020-06-12 20:26:04 +02:00
|
|
|
bot: {
|
2020-07-25 22:09:04 +02:00
|
|
|
user_id: 42,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm_bot__update: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_bot",
|
|
|
|
op: "update",
|
2020-06-12 20:26:04 +02:00
|
|
|
bot: {
|
|
|
|
user_id: 4321,
|
2020-07-15 01:29:15 +02:00
|
|
|
full_name: "The Bot Has A New Name",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm_domains__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_domains",
|
|
|
|
op: "add",
|
2020-06-12 20:26:04 +02:00
|
|
|
realm_domain: {
|
2020-07-15 01:29:15 +02:00
|
|
|
domain: "ramen",
|
2020-06-12 20:26:04 +02:00
|
|
|
allow_subdomains: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm_domains__change: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_domains",
|
|
|
|
op: "change",
|
2020-06-12 20:26:04 +02:00
|
|
|
realm_domain: {
|
2020-07-15 01:29:15 +02:00
|
|
|
domain: "ramen",
|
2020-06-12 20:26:04 +02:00
|
|
|
allow_subdomains: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
realm_domains__remove: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_domains",
|
|
|
|
op: "remove",
|
|
|
|
domain: "ramen",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-08-05 19:04:27 +02:00
|
|
|
realm_emoji__update: {
|
2020-07-29 14:05:55 +02:00
|
|
|
type: "realm_emoji",
|
2020-08-05 19:04:27 +02:00
|
|
|
op: "update",
|
|
|
|
realm_emoji: exports.test_realm_emojis,
|
2020-07-29 14:05:55 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
realm_export: {
|
|
|
|
type: "realm_export",
|
2020-08-06 00:14:21 +02:00
|
|
|
exports: [
|
|
|
|
{
|
|
|
|
id: 55,
|
|
|
|
export_time: fake_now,
|
2020-08-18 15:32:33 +02:00
|
|
|
acting_user_id: test_user.user_id,
|
2020-08-06 00:14:21 +02:00
|
|
|
export_url: "/some/path/to/export",
|
|
|
|
deleted_timestamp: null,
|
|
|
|
failed_timestamp: null,
|
|
|
|
pending: true,
|
|
|
|
},
|
|
|
|
],
|
2020-07-29 14:05:55 +02:00
|
|
|
},
|
|
|
|
|
2021-03-30 12:51:54 +02:00
|
|
|
realm_linkifiers: {
|
|
|
|
type: "realm_linkifiers",
|
|
|
|
realm_linkifiers: [
|
|
|
|
{
|
|
|
|
pattern: "#[123]",
|
linkifier: Support URL templates for linkifiers.
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits will be squashed with this commit.
We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.
The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.
This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.
Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.
With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.
We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.
Fixes #23124.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-05 20:55:31 +02:00
|
|
|
url_template: "ticket {id}",
|
2021-03-30 12:51:54 +02:00
|
|
|
id: 55,
|
|
|
|
},
|
|
|
|
],
|
2020-07-29 14:05:55 +02:00
|
|
|
},
|
|
|
|
|
2021-04-16 04:04:18 +02:00
|
|
|
realm_playgrounds: {
|
|
|
|
type: "realm_playgrounds",
|
|
|
|
realm_playgrounds: [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
name: "Lean playground",
|
|
|
|
pygments_language: "Lean",
|
2023-05-27 05:04:50 +02:00
|
|
|
url_template: "https://leanprover.github.io/live/latest/{#code}",
|
2021-04-16 04:04:18 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
realm_user__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_user",
|
|
|
|
op: "add",
|
2020-08-14 02:45:53 +02:00
|
|
|
person: {
|
2020-08-18 15:32:33 +02:00
|
|
|
...test_user,
|
2020-08-14 02:45:53 +02:00
|
|
|
avatar_url: "/some/path/to/avatar",
|
|
|
|
avatar_version: 1,
|
|
|
|
is_admin: false,
|
|
|
|
is_active: true,
|
|
|
|
is_owner: false,
|
2021-05-28 12:51:50 +02:00
|
|
|
is_billing_admin: false,
|
2021-04-11 07:38:09 +02:00
|
|
|
role: 400,
|
2020-08-14 02:45:53 +02:00
|
|
|
is_bot: false,
|
|
|
|
is_guest: false,
|
|
|
|
profile_data: {},
|
2020-10-27 01:41:00 +01:00
|
|
|
timezone: "America/New_York",
|
2020-08-14 02:45:53 +02:00
|
|
|
date_joined: "2020-01-01",
|
2022-05-25 13:13:31 +02:00
|
|
|
delivery_email: "test-delivery@example.com",
|
2020-08-14 02:45:53 +02:00
|
|
|
},
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2023-03-02 12:21:13 +01:00
|
|
|
realm_user__add_bot: {
|
|
|
|
type: "realm_user",
|
|
|
|
op: "add",
|
|
|
|
person: {
|
|
|
|
...test_user,
|
|
|
|
avatar_url: "/some/path/to/avatar",
|
|
|
|
avatar_version: 1,
|
|
|
|
is_admin: false,
|
|
|
|
is_active: true,
|
|
|
|
is_owner: false,
|
|
|
|
is_billing_admin: false,
|
|
|
|
role: 400,
|
|
|
|
is_bot: true,
|
|
|
|
is_guest: false,
|
|
|
|
profile_data: {},
|
|
|
|
timezone: "America/New_York",
|
|
|
|
date_joined: "2020-01-01",
|
|
|
|
delivery_email: "test-delivery@example.com",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2023-12-02 04:46:02 +01:00
|
|
|
realm_user__remove: {
|
|
|
|
type: "realm_user",
|
|
|
|
op: "remove",
|
|
|
|
person: {
|
|
|
|
user_id: test_user.user_id,
|
|
|
|
full_name: "Unknown user",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
realm_user__update: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "realm_user",
|
|
|
|
op: "update",
|
2020-06-12 20:26:04 +02:00
|
|
|
person: {
|
2020-08-18 15:32:33 +02:00
|
|
|
user_id: test_user.user_id,
|
2020-07-25 22:15:45 +02:00
|
|
|
full_name: "Bob NewName",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-08-30 16:26:38 +02:00
|
|
|
realm_user_settings_defaults__emojiset: {
|
|
|
|
type: "realm_user_settings_defaults",
|
|
|
|
op: "update",
|
|
|
|
property: "emojiset",
|
|
|
|
value: "google",
|
|
|
|
},
|
|
|
|
|
2021-09-16 12:47:12 +02:00
|
|
|
realm_user_settings_defaults__notification_sound: {
|
|
|
|
type: "realm_user_settings_defaults",
|
|
|
|
op: "update",
|
|
|
|
property: "notification_sound",
|
|
|
|
value: "ding",
|
|
|
|
},
|
|
|
|
|
2021-08-30 09:51:38 +02:00
|
|
|
realm_user_settings_defaults__presence_enabled: {
|
|
|
|
type: "realm_user_settings_defaults",
|
|
|
|
op: "update",
|
|
|
|
property: "presence_enabled",
|
|
|
|
value: false,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
restart: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "restart",
|
2021-04-18 11:28:39 +02:00
|
|
|
zulip_version: "4.0-dev+git",
|
2021-07-30 12:25:53 +02:00
|
|
|
zulip_merge_base: "",
|
2021-04-18 11:28:39 +02:00
|
|
|
zulip_feature_level: 55,
|
2021-03-13 22:32:51 +01:00
|
|
|
server_generation: 2,
|
2020-06-12 20:26:04 +02:00
|
|
|
immediate: true,
|
|
|
|
},
|
|
|
|
|
2023-05-01 14:29:57 +02:00
|
|
|
scheduled_messages__add: {
|
|
|
|
type: "scheduled_messages",
|
|
|
|
op: "add",
|
|
|
|
scheduled_messages: [
|
|
|
|
{
|
|
|
|
scheduled_message_id: 17,
|
|
|
|
type: "private",
|
|
|
|
to: [6],
|
|
|
|
content: "Hello there!",
|
|
|
|
rendered_content: "<p>Hello there!</p>",
|
|
|
|
scheduled_delivery_timestamp: 1681662420,
|
2023-10-03 17:02:25 +02:00
|
|
|
failed: false,
|
2023-05-01 14:29:57 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
scheduled_messages__remove: {
|
|
|
|
type: "scheduled_messages",
|
|
|
|
op: "remove",
|
|
|
|
scheduled_message_id: 17,
|
|
|
|
},
|
|
|
|
|
|
|
|
scheduled_messages__update: {
|
|
|
|
type: "scheduled_messages",
|
|
|
|
op: "update",
|
|
|
|
scheduled_message: {
|
|
|
|
scheduled_message_id: 17,
|
|
|
|
type: "private",
|
|
|
|
to: [6],
|
|
|
|
content: "Hello there!",
|
|
|
|
rendered_content: "<p>Hello there!</p>",
|
|
|
|
scheduled_delivery_timestamp: 1681662420,
|
2023-10-03 17:02:25 +02:00
|
|
|
failed: false,
|
2023-05-01 14:29:57 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
stream__create: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "stream",
|
|
|
|
op: "create",
|
2023-07-27 16:42:21 +02:00
|
|
|
streams: [
|
|
|
|
{
|
|
|
|
...streams.devel,
|
|
|
|
stream_weekly_traffic: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
...streams.test,
|
|
|
|
stream_weekly_traffic: null,
|
|
|
|
},
|
|
|
|
],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
stream__delete: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "stream",
|
|
|
|
op: "delete",
|
2023-07-27 16:42:21 +02:00
|
|
|
streams: [
|
|
|
|
{
|
|
|
|
...streams.devel,
|
|
|
|
stream_weekly_traffic: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
...streams.test,
|
|
|
|
stream_weekly_traffic: null,
|
|
|
|
},
|
|
|
|
],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 14:05:55 +02:00
|
|
|
stream__update: {
|
|
|
|
type: "stream",
|
|
|
|
op: "update",
|
|
|
|
name: "devel",
|
|
|
|
stream_id: 99,
|
|
|
|
property: "color",
|
|
|
|
value: "blue",
|
|
|
|
},
|
|
|
|
|
2021-01-04 16:21:54 +01:00
|
|
|
stream_typing__start: {
|
|
|
|
type: "typing",
|
|
|
|
op: "start",
|
|
|
|
message_type: "stream",
|
|
|
|
sender: typing_person1,
|
|
|
|
stream_id: this.stream_typing_in_id,
|
|
|
|
topic: this.topic_typing_in,
|
|
|
|
},
|
|
|
|
|
|
|
|
stream_typing__stop: {
|
|
|
|
type: "typing",
|
|
|
|
op: "stop",
|
|
|
|
message_type: "stream",
|
|
|
|
sender: typing_person1,
|
|
|
|
stream_id: this.stream_typing_in_id,
|
|
|
|
topic: this.topic_typing_in,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
submessage: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "submessage",
|
2020-06-12 20:26:04 +02:00
|
|
|
submessage_id: 99,
|
|
|
|
sender_id: 42,
|
2020-07-15 01:29:15 +02:00
|
|
|
msg_type: "stream",
|
2020-06-12 20:26:04 +02:00
|
|
|
message_id: 56,
|
2020-07-15 01:29:15 +02:00
|
|
|
content: "test",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
subscription__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "subscription",
|
|
|
|
op: "add",
|
2020-06-12 20:26:04 +02:00
|
|
|
subscriptions: [
|
|
|
|
{
|
2020-07-25 22:33:03 +02:00
|
|
|
...streams.devel,
|
|
|
|
audible_notifications: true,
|
|
|
|
color: "blue",
|
|
|
|
desktop_notifications: false,
|
|
|
|
email_notifications: false,
|
|
|
|
in_home_view: false,
|
|
|
|
is_muted: true,
|
|
|
|
pin_to_top: false,
|
|
|
|
push_notifications: false,
|
|
|
|
stream_weekly_traffic: 40,
|
|
|
|
wildcard_mentions_notify: false,
|
|
|
|
subscribers: [5, 8, 13, 21],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
subscription__peer_add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "subscription",
|
|
|
|
op: "peer_add",
|
2020-10-22 14:14:02 +02:00
|
|
|
user_ids: [test_user.user_id],
|
|
|
|
stream_ids: [streams.devel.stream_id],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
subscription__peer_remove: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "subscription",
|
|
|
|
op: "peer_remove",
|
2020-10-22 14:14:02 +02:00
|
|
|
user_ids: [test_user.user_id],
|
|
|
|
stream_ids: [streams.devel.stream_id],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2020-07-29 14:05:55 +02:00
|
|
|
subscription__remove: {
|
|
|
|
type: "subscription",
|
|
|
|
op: "remove",
|
|
|
|
subscriptions: [
|
|
|
|
{
|
|
|
|
name: "devel",
|
|
|
|
stream_id: 42,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
subscription__update: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "subscription",
|
|
|
|
op: "update",
|
2020-08-17 14:39:33 +02:00
|
|
|
stream_id: streams.devel.stream_id,
|
|
|
|
property: "pin_to_top",
|
|
|
|
value: true,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
typing__start: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "typing",
|
|
|
|
op: "start",
|
2023-10-01 20:20:05 +02:00
|
|
|
message_type: "direct",
|
2020-07-25 22:58:18 +02:00
|
|
|
sender: typing_person1,
|
|
|
|
recipients: [typing_person2],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
typing__stop: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "typing",
|
|
|
|
op: "stop",
|
2023-10-01 20:20:05 +02:00
|
|
|
message_type: "direct",
|
2020-07-25 22:58:18 +02:00
|
|
|
sender: typing_person1,
|
|
|
|
recipients: [typing_person2],
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
update_message_flags__read: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "update_message_flags",
|
2020-08-19 21:51:47 +02:00
|
|
|
op: "add",
|
2020-07-15 01:29:15 +02:00
|
|
|
operation: "add",
|
|
|
|
flag: "read",
|
2020-06-12 20:26:04 +02:00
|
|
|
messages: [999],
|
2020-07-25 23:12:51 +02:00
|
|
|
all: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
2021-06-09 13:31:39 +02:00
|
|
|
update_message_flags__read_remove: {
|
|
|
|
type: "update_message_flags",
|
|
|
|
op: "remove",
|
|
|
|
operation: "remove",
|
|
|
|
flag: "read",
|
|
|
|
messages: [888],
|
|
|
|
message_details: {888: message_detail},
|
|
|
|
all: false,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
update_message_flags__starred_add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "update_message_flags",
|
2020-08-19 21:51:47 +02:00
|
|
|
op: "add",
|
2020-07-15 01:29:15 +02:00
|
|
|
operation: "add",
|
|
|
|
flag: "starred",
|
2020-06-12 20:26:04 +02:00
|
|
|
messages: [exports.test_message.id],
|
2020-07-25 23:12:51 +02:00
|
|
|
all: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
update_message_flags__starred_remove: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "update_message_flags",
|
2020-08-19 21:51:47 +02:00
|
|
|
op: "remove",
|
2020-07-15 01:29:15 +02:00
|
|
|
operation: "remove",
|
|
|
|
flag: "starred",
|
2020-06-12 20:26:04 +02:00
|
|
|
messages: [exports.test_message.id],
|
2020-07-25 23:12:51 +02:00
|
|
|
all: false,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
user_group__add: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "user_group",
|
|
|
|
op: "add",
|
2020-06-12 20:26:04 +02:00
|
|
|
group: {
|
2020-07-25 23:14:28 +02:00
|
|
|
id: 555,
|
2020-07-15 01:29:15 +02:00
|
|
|
name: "Mobile",
|
2020-07-25 23:14:28 +02:00
|
|
|
description: "mobile folks",
|
2020-06-12 20:26:04 +02:00
|
|
|
members: [1],
|
2021-08-06 19:31:00 +02:00
|
|
|
is_system_group: false,
|
2022-05-16 17:02:44 +02:00
|
|
|
direct_subgroup_ids: [2],
|
2023-07-14 06:50:33 +02:00
|
|
|
can_mention_group: 11,
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
2020-07-29 14:05:55 +02:00
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
user_group__add_members: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "user_group",
|
|
|
|
op: "add_members",
|
2020-06-12 20:26:04 +02:00
|
|
|
group_id: 1,
|
|
|
|
user_ids: [2],
|
|
|
|
},
|
2020-07-29 14:05:55 +02:00
|
|
|
|
2022-05-02 16:41:51 +02:00
|
|
|
user_group__add_subgroups: {
|
|
|
|
type: "user_group",
|
|
|
|
op: "add_subgroups",
|
|
|
|
group_id: 1,
|
2022-05-16 17:02:44 +02:00
|
|
|
direct_subgroup_ids: [3],
|
2022-05-02 16:41:51 +02:00
|
|
|
},
|
|
|
|
|
2021-03-26 18:25:36 +01:00
|
|
|
user_group__remove: {
|
|
|
|
type: "user_group",
|
|
|
|
op: "remove",
|
|
|
|
group_id: 1,
|
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
user_group__remove_members: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "user_group",
|
|
|
|
op: "remove_members",
|
2020-06-12 20:26:04 +02:00
|
|
|
group_id: 3,
|
|
|
|
user_ids: [99, 100],
|
|
|
|
},
|
2020-07-29 14:05:55 +02:00
|
|
|
|
2022-05-02 16:41:51 +02:00
|
|
|
user_group__remove_subgroups: {
|
|
|
|
type: "user_group",
|
|
|
|
op: "remove_subgroups",
|
|
|
|
group_id: 1,
|
2022-05-16 17:02:44 +02:00
|
|
|
direct_subgroup_ids: [3],
|
2022-05-02 16:41:51 +02:00
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
user_group__update: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "user_group",
|
|
|
|
op: "update",
|
2020-06-12 20:26:04 +02:00
|
|
|
group_id: 3,
|
|
|
|
data: {
|
2020-07-15 01:29:15 +02:00
|
|
|
name: "Frontend",
|
|
|
|
description: "All Frontend people",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
|
|
|
},
|
2020-07-29 14:05:55 +02:00
|
|
|
|
2021-07-27 19:02:05 +02:00
|
|
|
user_settings__color_scheme_automatic: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "color_scheme",
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__color_scheme_dark: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "color_scheme",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__color_scheme_light: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "color_scheme",
|
|
|
|
value: 3,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__default_language: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "default_language",
|
|
|
|
value: "fr",
|
|
|
|
language_name: "French",
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__demote_inactive_streams: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "demote_inactive_streams",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__dense_mode: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "dense_mode",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2022-04-20 04:46:36 +02:00
|
|
|
user_settings__display_emoji_reaction_users: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "display_emoji_reaction_users",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2023-03-27 16:49:14 +02:00
|
|
|
user_settings__email_address_visibility: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "email_address_visibility",
|
|
|
|
value: 5,
|
|
|
|
},
|
|
|
|
|
2021-07-27 19:02:05 +02:00
|
|
|
user_settings__emojiset: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "emojiset",
|
|
|
|
value: "google",
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__enable_stream_audible_notifications: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "enable_stream_audible_notifications",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__enter_sends: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "enter_sends",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__fluid_layout_width: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "fluid_layout_width",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__high_contrast_mode: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "high_contrast_mode",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2023-06-01 01:19:38 +02:00
|
|
|
user_settings__notification_sound: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "notification_sound",
|
|
|
|
value: "ding",
|
|
|
|
},
|
|
|
|
|
2022-09-20 20:49:22 +02:00
|
|
|
user_settings__presence_disabled: {
|
2021-09-17 13:14:04 +02:00
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "presence_enabled",
|
|
|
|
value: false,
|
|
|
|
},
|
|
|
|
|
2022-09-20 20:49:22 +02:00
|
|
|
user_settings__presence_enabled: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "presence_enabled",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2021-07-27 19:02:05 +02:00
|
|
|
user_settings__starred_message_counts: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "starred_message_counts",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__translate_emoticons: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "translate_emoticons",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__twenty_four_hour_time: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "twenty_four_hour_time",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
2022-08-12 22:41:06 +02:00
|
|
|
user_settings__user_list_style: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "user_list_style",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
2023-10-23 09:02:57 +02:00
|
|
|
user_settings__web_escape_navigates_to_home_view: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_escape_navigates_to_home_view",
|
|
|
|
value: true,
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__web_home_view_all_messages: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_home_view",
|
|
|
|
value: "all_messages",
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__web_home_view_inbox: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_home_view",
|
|
|
|
value: "inbox",
|
|
|
|
},
|
|
|
|
|
|
|
|
user_settings__web_home_view_recent_topics: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_home_view",
|
|
|
|
value: "recent_topics",
|
|
|
|
},
|
|
|
|
|
2023-03-08 02:27:45 +01:00
|
|
|
user_settings__web_mark_read_on_scroll_policy: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_mark_read_on_scroll_policy",
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
|
2023-04-25 13:37:16 +02:00
|
|
|
user_settings__web_stream_unreads_count_display_policy: {
|
|
|
|
type: "user_settings",
|
|
|
|
op: "update",
|
|
|
|
property: "web_stream_unreads_count_display_policy",
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
|
2021-06-27 19:04:17 +02:00
|
|
|
user_status__set_status_emoji: {
|
2023-09-19 08:13:40 +02:00
|
|
|
id: 1,
|
2021-06-27 19:04:17 +02:00
|
|
|
type: "user_status",
|
|
|
|
user_id: test_user.user_id,
|
|
|
|
emoji_name: "smiley",
|
|
|
|
emoji_code: "1f603",
|
|
|
|
reaction_type: "unicode_emoji",
|
2023-09-19 08:13:40 +02:00
|
|
|
status_text: "",
|
2021-06-27 19:04:17 +02:00
|
|
|
},
|
|
|
|
|
2020-06-12 20:26:04 +02:00
|
|
|
user_status__set_status_text: {
|
2020-07-15 01:29:15 +02:00
|
|
|
type: "user_status",
|
2020-08-18 15:32:33 +02:00
|
|
|
user_id: test_user.user_id,
|
2020-07-15 01:29:15 +02:00
|
|
|
status_text: "out to lunch",
|
2020-06-12 20:26:04 +02:00
|
|
|
},
|
2022-08-26 22:59:07 +02:00
|
|
|
|
|
|
|
user_topic: {
|
|
|
|
type: "user_topic",
|
|
|
|
stream_id: 101,
|
|
|
|
topic_name: "js",
|
|
|
|
last_updated: fake_now,
|
|
|
|
visibility_policy: 1,
|
|
|
|
},
|
2020-06-12 20:26:04 +02:00
|
|
|
};
|