"use strict";

const Promise = require("bluebird");
const createSession = require("@modular-matrix/create-session");
const sendImageEvent = require(".");

return Promise.try(() => {
	return createSession("https://pixie.town/", { accessToken: require("../../../private/access-token") });
}).then((session) => {
	return Promise.try(() => {
		return sendImageEvent(session, {
			roomID: "!TFtSgVEJlHMAhDyHOk:pixie.town",
			description: "video.mp4",
			video: {
				url: "mxc://pixie.town/nOXbufEBytEHyTFPydqLBbsW",
				displayWidth: 176,
				displayHeight: 234,
				mimetype: "video/mp4",
				filesize: 81770
			},
			thumbnail: {
				url: "mxc://pixie.town/ZgoXjZXGehIIVhoyrlwOyEnH",
				displayWidth: 176,
				displayHeight: 234,
				mimetype: "image/jpeg",
				filesize: 113924
			},
		});
	}).then((result) => {
		console.log(result);
	});
});
