Open lfaltoni opened 1 month ago
To retrieve messages from the group, I am using this to get information about incoming messages, whether they are from the group or not.
message.Info.MessageSource.IsGroup
To retrieve messages from the group, I am using this to get information about incoming messages, whether they are from the group or not.
message.Info.MessageSource.IsGroup
Sorry, could you explain better? Where do you use that?
Hi, i cannot figure out how to get messages from group.
I have checked the docs and all I can find is the get_newsletter_messages() function, but I cannot understand how to find the “before” argument, and what the function expects.
Docs says the before argument is optional, but I get the following
error: An unexpected error occurred while retrieving messages: argument 5: TypeError: 'NoneType' object cannot be interpreted as an integer
Could you tell me if I’m correctly using this function? If not, what’s the best function to get messages from WhatsApp groups?
get_newsletter_messages(jid, count, before) Retrieves a list of newsletter messages for a given JID.
Parameters: jid (JID) – The JID (Jabber Identifier) of the user.
count (int) – The maximum number of messages to retrieve.
before (MessageServerID) – The ID of the message before which to retrieve messages.
Returns: A list of newsletter messages.
Return type: RepeatedCompositeFieldContaine[NewsletterMessage]