rip out unused mkPresence
it only serves to make the strict type checker complain
This commit is contained in:
parent
9584388171
commit
9901219194
1 changed files with 0 additions and 23 deletions
|
@ -315,29 +315,6 @@ export function mkEvent(opts: MakeEventProps): MatrixEvent {
|
||||||
return mxEvent;
|
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.
|
* Create an m.room.member event.
|
||||||
* @param {Object} opts Values for the membership.
|
* @param {Object} opts Values for the membership.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue