MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / addMessageEvent

Function addMessageEvent

apps/web/services/slack/webhooks/webhook.test.ts:18–56  ·  view source on GitHub ↗
({
  team_id,
  ts = generateRandomDate(),
  channel_id,
}: {
  team_id: string;
  ts?: string;
  channel_id: string;
})

Source from the content-addressed store, hash-verified

16 : never;
17
18const addMessageEvent = ({
19 team_id,
20 ts = generateRandomDate(),
21 channel_id,
22}: {
23 team_id: string;
24 ts?: string;
25 channel_id: string;
26}) => ({
27 token: v4(),
28 team_id,
29 api_app_id: v4(),
30 event: {
31 client_msg_id: v4(),
32 type: 'message',
33 text: 'this is test3',
34 user: v4(),
35 ts,
36 team: team_id,
37 blocks: [{ type: 'rich_text', block_id: '9hC', elements: [] }],
38 channel: channel_id,
39 event_ts: ts,
40 channel_type: 'channel',
41 },
42 type: 'event_callback',
43 event_id: v4(),
44 event_time: 1650805199,
45 authorizations: [
46 {
47 enterprise_id: null,
48 team_id,
49 user_id: v4(),
50 is_bot: false,
51 is_enterprise_install: false,
52 },
53 ],
54 is_ext_shared_channel: false,
55 event_context: v4(),
56});
57
58const deleteMessageEvent = ({
59 team_id,

Callers 1

webhook.test.tsFile · 0.85

Calls 1

generateRandomDateFunction · 0.90

Tested by

no test coverage detected