UNPKG

@microsoft/teams.api

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t

102 lines (99 loc) • 2.23 kB
'use strict'; var activity = require('../activity'); class MessageUpdateActivity extends activity.Activity { /** * The text content of the message. */ text; /** * The text to speak. * @deprecated This will be removed by end of summer 2026. */ speak; /** * The text to display if the channel cannot render cards. */ summary; /** * The time at which the activity should be considered to be "expired" and should not be * presented to the recipient. * @deprecated This will be removed by end of summer 2026. */ expiration; /** * A value that is associated with the activity. */ value; constructor(eventType, value = {}) { super({ ...value, type: "messageUpdate", channelData: { ...value?.channelData, eventType } }); Object.assign(this, { ...value, channelData: { ...value?.channelData, eventType } }); } /** * initialize from interface */ static from(activity) { return new MessageUpdateActivity(activity.channelData.eventType, activity); } /** * convert to interface */ toInterface() { return Object.assign({}, this); } /** * copy to a new instance */ clone(options = {}) { return new MessageUpdateActivity(this.channelData.eventType, { ...this.toInterface(), ...options }); } /** * The text content of the message. */ withText(value) { this.text = value; return this; } /** * The text to speak. * @deprecated This will be removed by end of summer 2026. */ withSpeak(value) { this.speak = value; return this; } /** * The text to display if the channel cannot render cards. */ withSummary(value) { this.summary = value; return this; } /** * The time at which the activity should be considered to be "expired" and should not be * presented to the recipient. * @deprecated This will be removed by end of summer 2026. */ withExpiration(value) { this.expiration = value; return this; } } exports.MessageUpdateActivity = MessageUpdateActivity; //# sourceMappingURL=message-update.js.map //# sourceMappingURL=message-update.js.map