Legacy Notice: This extension is considered legacy and is scheduled for deprecation in the near future. It is no longer recommended for new integrations.Please note: Legacy extensions are no longer actively maintained and will not receive feature updates or enhancements.
Before you begin
This Extension uses a third-party API service - Scanii - to scan media messages. Create an account with Scanii API Service and get your pair of API Key and Secret.Extension settings
- Login to CometChat and select your app.
- Go to the Extensions section and enable the Virus and Malware Scanner extension.
- Open the Settings for this extension.
- Enter Scanii API Key and Scanii Secret and click on save.
How does it work?
Once the Extension is enabled for your App and the Extension Settings are saved, the recipients will receive metadata with an array of results. The Virus Scan results will be updated later for the message and hence you need to implement theonMessageEdited
listener. Please check the Edit a Message page under the Messaging section of each SDK for more details.
This can be used to show warning messages:
- JSON
The
You can iterate over
scan_results
, to the outside of attachments
are the result for the first attachment from the attachments
array. This has been retained for backward compatibility only.You can iterate over
attachments
array for better implementation.Implementation
At the recipients’ end, from the message object, you can fetch the metadata by calling the getMetadata() method. Using this metadata, you can fetch the Rich Media Embed.- JavaScript
- Java
- Kotlin
- Swift