mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: rename payload to ensure consistency
This commit is contained in:
parent
8d1bb47b2a
commit
356b16aa9d
@ -19,7 +19,7 @@ export type Payload =
|
|||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
type: PayloadType.attachments;
|
type: PayloadType.attachments;
|
||||||
attachments: AttachmentPayload;
|
attachment: AttachmentPayload;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum QuickReplyType {
|
export enum QuickReplyType {
|
||||||
|
@ -389,7 +389,7 @@ describe('BlockService', () => {
|
|||||||
const result = blockService.matchPayload(
|
const result = blockService.matchPayload(
|
||||||
{
|
{
|
||||||
type: PayloadType.attachments,
|
type: PayloadType.attachments,
|
||||||
attachments: {
|
attachment: {
|
||||||
type: FileType.file,
|
type: FileType.file,
|
||||||
payload: {
|
payload: {
|
||||||
id: '9'.repeat(24),
|
id: '9'.repeat(24),
|
||||||
|
@ -146,7 +146,7 @@ export const webEvents: [string, Web.IncomingMessage, any][] = [
|
|||||||
messageType: IncomingMessageType.attachments,
|
messageType: IncomingMessageType.attachments,
|
||||||
payload: {
|
payload: {
|
||||||
type: IncomingMessageType.attachments,
|
type: IncomingMessageType.attachments,
|
||||||
attachments: {
|
attachment: {
|
||||||
type: FileType.image,
|
type: FileType.image,
|
||||||
payload: {
|
payload: {
|
||||||
id: '9'.repeat(24),
|
id: '9'.repeat(24),
|
||||||
|
@ -225,7 +225,7 @@ export default class WebEventWrapper<
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
type: PayloadType.attachments,
|
type: PayloadType.attachments,
|
||||||
attachments: {
|
attachment: {
|
||||||
type: Attachment.getTypeByMime(this._adapter.raw.data.type),
|
type: Attachment.getTypeByMime(this._adapter.raw.data.type),
|
||||||
payload: {
|
payload: {
|
||||||
id: this._adapter.attachment.id,
|
id: this._adapter.attachment.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user