mirror of
https://github.com/hexastack/hexabot
synced 2024-12-02 00:54:56 +00:00
Merge pull request #375 from Hexastack/fix/remove-unecessary-channel-methods
fix: remove unecessary channel handler methods
This commit is contained in:
commit
8859a2289c
@ -11,7 +11,6 @@ import path from 'path';
|
|||||||
import { Injectable, OnModuleInit } from '@nestjs/common';
|
import { Injectable, OnModuleInit } from '@nestjs/common';
|
||||||
import { NextFunction, Request, Response } from 'express';
|
import { NextFunction, Request, Response } from 'express';
|
||||||
|
|
||||||
import { Attachment } from '@/attachment/schemas/attachment.schema';
|
|
||||||
import { SubscriberCreateDto } from '@/chat/dto/subscriber.dto';
|
import { SubscriberCreateDto } from '@/chat/dto/subscriber.dto';
|
||||||
import {
|
import {
|
||||||
StdOutgoingEnvelope,
|
StdOutgoingEnvelope,
|
||||||
@ -135,15 +134,6 @@ export default abstract class ChannelHandler<
|
|||||||
*/
|
*/
|
||||||
abstract _attachmentFormat(message: StdOutgoingMessage, options?: any): any;
|
abstract _attachmentFormat(message: StdOutgoingMessage, options?: any): any;
|
||||||
|
|
||||||
/**
|
|
||||||
* Format a collection of items to be sent to the channel in carousel/list format
|
|
||||||
*
|
|
||||||
* @param data - A list of data items to be sent to the end user
|
|
||||||
* @param options - Might contain additional settings
|
|
||||||
* @returns {Object[]} - An array of element objects
|
|
||||||
*/
|
|
||||||
abstract _formatElements(data: any[], options: any, ...args: any): any[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format a list of elements
|
* Format a list of elements
|
||||||
*
|
*
|
||||||
@ -196,16 +186,6 @@ export default abstract class ChannelHandler<
|
|||||||
event: EventWrapper<any, any>,
|
event: EventWrapper<any, any>,
|
||||||
): Promise<SubscriberCreateDto>;
|
): Promise<SubscriberCreateDto>;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param _attachment - The attachment that needs to be uploaded to the channel
|
|
||||||
* @returns {Promise<Attachment>}
|
|
||||||
* Uploads an attachment to the channel as some require file to be uploaded so
|
|
||||||
* that they could be used in messaging (dimelo, twitter, ...)
|
|
||||||
*/
|
|
||||||
async uploadAttachment(_attachment: Attachment): Promise<Attachment> {
|
|
||||||
return _attachment;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom channel middleware
|
* Custom channel middleware
|
||||||
* @param req
|
* @param req
|
||||||
|
Loading…
Reference in New Issue
Block a user