@open-wa/wa-automate-types-only 4.64.0 → 4.64.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -211,6 +211,62 @@ export interface Message {
|
|
211
211
|
* The options of a poll
|
212
212
|
*/
|
213
213
|
pollOptions?: PollOption[];
|
214
|
+
/**
|
215
|
+
* The reaction of the host account to this message
|
216
|
+
*/
|
217
|
+
reactionByMe?: ReactionSender;
|
218
|
+
reactions: {
|
219
|
+
aggregateEmoji: string;
|
220
|
+
/**
|
221
|
+
* The senders of this reaction
|
222
|
+
*/
|
223
|
+
senders: ReactionSender[];
|
224
|
+
/**
|
225
|
+
* If the host account has reacted to this message with this reaction
|
226
|
+
*/
|
227
|
+
hasReactionByMe: boolean;
|
228
|
+
/**
|
229
|
+
* The message ID of the reaction itself
|
230
|
+
*/
|
231
|
+
id: string;
|
232
|
+
}[];
|
233
|
+
}
|
234
|
+
export interface ReactionSender {
|
235
|
+
/**
|
236
|
+
* The ID of the message being reacted to
|
237
|
+
*/
|
238
|
+
parentMsgKey: MessageId;
|
239
|
+
/**
|
240
|
+
* The contact ID of the sender of the reaction
|
241
|
+
*/
|
242
|
+
senderUserJid: ContactId;
|
243
|
+
/**
|
244
|
+
* The message ID of the reaction itself
|
245
|
+
*/
|
246
|
+
msgKey: MessageId;
|
247
|
+
/**
|
248
|
+
* The text of the reaction
|
249
|
+
*/
|
250
|
+
reactionText: string;
|
251
|
+
/**
|
252
|
+
* The timestamp of the reaction
|
253
|
+
*/
|
254
|
+
timestamp: number;
|
255
|
+
orphan: number;
|
256
|
+
/**
|
257
|
+
* If the reaction was seen/read
|
258
|
+
*/
|
259
|
+
read: boolean;
|
260
|
+
/**
|
261
|
+
* The timestamp of the reaction
|
262
|
+
*/
|
263
|
+
t?: number;
|
264
|
+
/**
|
265
|
+
* The message ID of the reaction itself
|
266
|
+
*/
|
267
|
+
id: MessageId;
|
268
|
+
isSendFailure: boolean;
|
269
|
+
ack?: number;
|
214
270
|
}
|
215
271
|
export interface PollOption {
|
216
272
|
name: string;
|
@@ -1,6 +1,13 @@
|
|
1
1
|
import { Client } from "../api/Client";
|
2
2
|
import { Message } from "../api/model/message";
|
3
|
-
|
3
|
+
/**
|
4
|
+
* A function that takes a message and returns a message.
|
5
|
+
*
|
6
|
+
* @param message The message to be processed
|
7
|
+
* @param client The client that received the message
|
8
|
+
* @param alreadyProcessed Whether the message has already been processed by another preprocessor. (This is useful in cases where you want to mutate the message for both onMessage and onAnyMessage events but only want to do the actual process, like uploading to s3, once.)
|
9
|
+
*/
|
10
|
+
export type MessagePreProcessor = (message: Message, client?: Client, alreadyProcessed?: boolean) => Promise<Message>;
|
4
11
|
/**
|
5
12
|
* An object that contains all available [[PREPROCESSORS]].
|
6
13
|
*
|