Repository navigation
Sample State
James Hawkins edited this page Feb 27, 2019
·
6 revisions
{
entities: {
users: {
1: {
id: 1,
fullName: "Michael Scott",
alias: null,
starredMessages: [2,1,4],
starredChatrooms: [],
profilePhoto: "https://upload.wikimedia.org/wikipedia/en/d/dc/MichaelScott.png"
},
2: {
id: 2,
fullName: "James Halpert",
alias: "Jim Halpert",
starredMessages: [],
starredChatrooms: [11,44],
profilePhoto: "https://upload.wikimedia.org/wikipedia/en/7/7e/Jim-halpert.jpg"
}
3: {
id: 3,
fullName: "Andy Bernard",
alias: "Nard Dog",
starredMessages: [4],
starredChatrooms: [],
profilePhoto: "https://upload.wikimedia.org/wikipedia/en/8/84/Andy_Bernard_photoshot.jpg"
}
},
messages: {
1: {
id: 1,
body: "I earned that job! I was personally chosen after Robert was chosen and quit.",
chatroomId: 4,
authorId: 2,
parentId: null,
reactionIds: [2,1,4],
},
2: {
id: 2,
body: "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me.",
chatroomId: 2,
authorId: 1,
parentId: 7,
reactionIds: [],
},
3: {
id: 3,
body: "i'm running late lmk if you want to push the meeting back",
chatroomId: 1,
authorId: 5,
parentId: null,
reactionIds: [5,6],
},
4: {
id: 4,
body: "sounds good -- I'm not really ready for it yet anyway",
chatroomId: 1,
authorId: 6,
parentId: 3,
reactionIds: [7],
}
},
chatrooms: {
1: {
id: 1,
title: "general",
topic: "A place for general conversation",
type: "channel",
adminId: 1,
pinnedMessageIds: [2,4],
},
2: {
id: 2,
title: null,
topic: "quick chat about indexing the haptic xml pixel",
type: "direct_message",
adminId: 2,
pinnedMessageIds: [11],
},
3: {
id: 3,
title: "Performance Reviews",
topic: "Channel to discuss specifics about the upcoming perf cycle",
type: "channel",
adminId: 7,
pinnedMessageIds: [],
}
},
chatroomSubscriptions: {
1: {
id: 1,
chatroomId: 3,
userId: 1,
lastReadMessageId: 8
},
2: {
id: 2,
chatroomId: 1,
userId: 4,
lastReadMessageId: 10
},
3: {
id: 3,
chatroomId: 1,
userId: 6,
lastReadMessageId: 3
}
},
stars: {
1: {
id: 1,
starrableId: 8,
starrableType: 'chatroom',
userId: 1,
},
2: {
id: 2,
starrableId: 1,
starrableType: 'direct_message',
userId: 9,
},
3: {
id: 3,
starrableId: 3,
starrableType: 'chatroom',
userId: 1,
},
4: {
id: 4,
starrableId: 8,
starrableType: 'direct_message',
userID: 1,
}
},
pinnedMessages: {
1: {
id: 1,
chatroomId: 1,
messageId: 9,
},
2: {
id: 2,
chatroomId: 7,
messageId: 43,
},
3: {
id: 3,
chatroomId: 11,
messageId: 33,
}
},
reactions: {
1: {
id: 1,
emojiId: 11,
messageId: 47,
userId: 3,
},
2: {
id: 2,
emojiId: 4,
messageId: 55,
userId: 4,
},
3: {
id: 3,
emojiId: 9,
messageId: 33,
userId: 8,
}
},
emojis: {
1: {
id: 1,
title: ":blushing_face",
emoji: "😊",
},
2: {
id: 2,
title: "mind_blown",
emoji: "🤯",
},
3: {
id: 3,
title: "thumbs_down",
emoji: "👎",
}
},
},
ui: {
loading: true / false
},
errors: {
login: ["Sorry, you entered an incorrect email address or password."],
chatroomForm: ["That name is already taken by another channel."],
},
session: {
currentUserId: 5,
landingPageEmail: null
}
}