From 44a28efe1a31e9de1846a10070451734b6ca22f4 Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 23 Oct 2023 18:06:24 -0600 Subject: [PATCH] ChatMessage Add Fix --- packages/graph/teams/types.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/graph/teams/types.ts b/packages/graph/teams/types.ts index 86196c8b7..8d5ef065b 100644 --- a/packages/graph/teams/types.ts +++ b/packages/graph/teams/types.ts @@ -174,33 +174,27 @@ export interface IChannels extends _Channels, IGetById { } export const Channels = graphInvokableFactory(_Channels); /** - * Channel + * Message */ export class _Message extends _GraphQueryableInstance { } export interface IMessage extends _Message { } export const Message = graphInvokableFactory(_Message); /** - * Channels + * Messages */ @defaultPath("messages") @getById(Message) export class _Messages extends _GraphQueryableCollection { /** - * Creates a new Channel in the Team - * @param displayName The display name of the new channel - * @param description Optional description of the channel + * Adds a message + * @param message ChatMessage object that defines the message * */ - public async add(displayName: string, description = ""): Promise { + public async add(message: IChatMessage): Promise { - const postBody = { - description, - displayName, - }; - - const data = await graphPost(this, body(postBody)); + const data = await graphPost(this, body(message)); return { message: (this).getById(data.id),