import { Injectable } from '@angular/core';
import { ChatService } from '../chat.service';

@Injectable({
  providedIn: 'root'
})
export class ChatMethodsService {

  constructor(private chatService: ChatService) {
  }

  sendMessage(roomId:string, data:any) {

    let body = {
      "message":
      {
        "rid": roomId,
        "msg":"",
        "file":{
          "type": "application/meeting",
          "subject": data.subject,
          "start_date": data.start,
          "end_date": data.end,
          "venue": data.venue,
          "id": data.id,
        }
      }
    }
    this.chatService.sendMessage(body).subscribe(res=> {});
  }
}
