mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: ensure retro-compatibility (we hope)
This commit is contained in:
parent
f01d5a4ee3
commit
be1a79f3ea
@ -235,6 +235,19 @@ export default abstract class ChannelHandler<
|
|||||||
event: EventWrapper<any, any, N>,
|
event: EventWrapper<any, any, N>,
|
||||||
): Promise<AttachmentFile | undefined>;
|
): Promise<AttachmentFile | undefined>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch the subscriber profile data
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
* @param event - The message event received
|
||||||
|
* @returns {Promise<Subscriber>} - The channel's response, otherwise an error
|
||||||
|
*/
|
||||||
|
async getUserData(
|
||||||
|
event: EventWrapper<any, any, N>,
|
||||||
|
): Promise<SubscriberCreateDto> {
|
||||||
|
return await this.getSubscriberData(event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the subscriber profile data
|
* Fetch the subscriber profile data
|
||||||
*
|
*
|
||||||
|
@ -31,7 +31,11 @@ export type AttachmentRef =
|
|||||||
url: string;
|
url: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface AttachmentPayload {
|
/** IMPORTANT: No need to use generic type here */
|
||||||
|
export interface AttachmentPayload<T extends AttachmentRef = AttachmentRef> {
|
||||||
type: FileType;
|
type: FileType;
|
||||||
payload: AttachmentRef;
|
payload: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
|
export type WithUrl<A> = A & { url?: string };
|
||||||
|
Loading…
Reference in New Issue
Block a user