rip out unused mkPresence

it only serves to make the strict type checker complain
pull/28788/head^2
Richard van der Hoff 2022-12-17 23:50:34 +00:00
parent 9584388171
commit 9901219194
1 changed files with 0 additions and 23 deletions

View File

@ -315,29 +315,6 @@ export function mkEvent(opts: MakeEventProps): MatrixEvent {
return mxEvent;
}
/**
* Create an m.presence event.
* @param {Object} opts Values for the presence.
* @return {Object|MatrixEvent} The event
*/
export function mkPresence(opts) {
if (!opts.user) {
throw new Error("Missing user");
}
const event = {
event_id: "$" + Math.random() + "-" + Math.random(),
type: "m.presence",
sender: opts.user,
content: {
avatar_url: opts.url,
displayname: opts.name,
last_active_ago: opts.ago,
presence: opts.presence || "offline",
},
};
return opts.event ? new MatrixEvent(event) : event;
}
/**
* Create an m.room.member event.
* @param {Object} opts Values for the membership.