(channelId: string, event: RelayEvent)
| 3218 | } |
| 3219 | |
| 3220 | function recordMockMessage(channelId: string, event: RelayEvent) { |
| 3221 | const history = getMockMessageStore(channelId); |
| 3222 | history.push(event); |
| 3223 | |
| 3224 | const channel = mockChannels.find((candidate) => candidate.id === channelId); |
| 3225 | if (!channel) { |
| 3226 | return; |
| 3227 | } |
| 3228 | |
| 3229 | channel.last_message_at = new Date(event.created_at * 1_000).toISOString(); |
| 3230 | touchMockChannel(channel); |
| 3231 | } |
| 3232 | |
| 3233 | function resetMockUserStatuses() { |
| 3234 | mockUserStatuses.length = 0; |
no test coverage detected