Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lincd-cometchat

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lincd-cometchat

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

lincd-cometchat Report, Block and Message Extension Functions Documentation

Introduction

This repository contains functions developed for integrating CometChat into the lincd platform.

Functions

1. loadMessageExtension()

Purpose

This function is responsible for ensuring the smooth loading of the CometChat extension on the CometChat frontend, particularly when fetching group information and related data.

Usage
import { loadMessageExtension } from 'lincd-cometchat';
loadMessageExtension();

2. Render the user interaction modal

Purpose

This function renders a modal allowing users to report messages and block other users within the CometChat environment.

Usage
import {ReportMessageModal} from 'lincd-cometchat/lib/MessageExtension
return(
    <ReportMessageModal 
    ..props
    blockUser={blockUser}
    message={messageSelected}
    onClose={() => setOnReport(false)}
    getReason={(reason) => setReasonReported(reason)}
    deleteAndReportMessage={deleteAndReportMessage}
    handleReportError={handleReportError}
    />
)

Check all the props on interface

Props and Dependencies

These functions require certain props and methods extracted from the chat pages (initial pages). The following props and methods are necessary:

    blockUser={blockUser}
    message={messageSelected}
    onClose={() => setOnReport(false)}
    getReason={(reason) => setReasonReported(reason)}
    deleteAndReportMessage={deleteAndReportMessage}
    handleReportError={handleReportError}

Noted:

loadMessageExtension: Ensures smooth loading of the CometChat extension. fetchMessageTemplates: Retrieves CometChat message template categories and messages. Other optional methods or options necessary for the proper functioning of the required extensions. Ensure all required props and methods are imported from the previous project for seamless integration and functionality.

Usage:

import React, { useEffect } from 'react'; import { loadMessageExtension, fetchMessageTemplates } from 'lincd-cometchat';

const ChatPage = () => { useEffect(() => { loadMessageExtension(); fetchMessageTemplates(); // Other necessary methods or options }, []);

return (

{/* Your CometChat chat page components */}
); };

export default ChatPage;

Keywords

FAQs

Package last updated on 30 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc