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

Function changeMessageEvent

apps/web/services/slack/webhooks/webhook.test.ts:105–161  ·  view source on GitHub ↗
({
  team_id,
  ts,
  channel_id,
}: {
  team_id: string;
  ts: string;
  channel_id: string;
})

Source from the content-addressed store, hash-verified

103});
104
105const changeMessageEvent = ({
106 team_id,
107 ts,
108 channel_id,
109}: {
110 team_id: string;
111 ts: string;
112 channel_id: string;
113}) => ({
114 token: v4(),
115 team_id: team_id,
116 api_app_id: v4(),
117 event: {
118 type: 'message',
119 subtype: 'message_changed',
120 message: {
121 client_msg_id: v4(),
122 type: 'message',
123 text: 'Lets test_4',
124 user: v4(),
125 team: team_id,
126 edited: [{}],
127 blocks: [{ type: 'rich_text', block_id: '9hC', elements: [] }],
128 ts: ts,
129 source_team: team_id,
130 user_team: team_id,
131 },
132 previous_message: {
133 client_msg_id: v4(),
134 type: 'message',
135 text: v4(),
136 user: v4(),
137 ts: ts,
138 team: team_id,
139 blocks: [{ type: 'rich_text', block_id: '9hC', elements: [] }],
140 },
141 channel: channel_id,
142 hidden: true,
143 ts: generateRandomDate(),
144 event_ts: generateRandomDate(),
145 channel_type: 'channel',
146 },
147 type: 'event_callback',
148 event_id: v4(),
149 event_time: 1652202460,
150 authorizations: [
151 {
152 enterprise_id: null,
153 team_id: team_id,
154 user_id: v4(),
155 is_bot: false,
156 is_enterprise_install: false,
157 },
158 ],
159 is_ext_shared_channel: false,
160 event_context: v4(),
161});
162

Callers 1

webhook.test.tsFile · 0.85

Calls 1

generateRandomDateFunction · 0.90

Tested by

no test coverage detected