Compare commits
2 commits
4167a01ed1
...
cce432aeee
Author | SHA1 | Date | |
---|---|---|---|
cce432aeee | |||
e5f7c7fdcb |
2 changed files with 3 additions and 3 deletions
|
@ -602,9 +602,9 @@ async function messageToEvent(message, guild, options = {}, di) {
|
||||||
let chosenImage = embed.image?.url
|
let chosenImage = embed.image?.url
|
||||||
// the thumbnail seems to be used for "article" type but displayed big at the bottom by discord
|
// the thumbnail seems to be used for "article" type but displayed big at the bottom by discord
|
||||||
if (embed.type === "article" && embed.thumbnail?.url && !chosenImage) chosenImage = embed.thumbnail.url
|
if (embed.type === "article" && embed.thumbnail?.url && !chosenImage) chosenImage = embed.thumbnail.url
|
||||||
if (chosenImage) rep.addParagraph(`📸 ${chosenImage}`)
|
if (chosenImage) rep.addParagraph(`📸 ${dUtils.getPublicUrlForCdn(chosenImage)}`)
|
||||||
|
|
||||||
if (embed.video?.url) rep.addParagraph(`🎞️ ${embed.video.url}`)
|
if (embed.video?.url) rep.addParagraph(`🎞️ ${dUtils.getPublicUrlForCdn(embed.video.url)}`)
|
||||||
|
|
||||||
if (embed.footer?.text) rep.addLine(`— ${embed.footer.text}`, tag`— ${embed.footer.text}`)
|
if (embed.footer?.text) rep.addLine(`— ${embed.footer.text}`, tag`— ${embed.footer.text}`)
|
||||||
let {body, formatted_body: html} = rep.get()
|
let {body, formatted_body: html} = rep.get()
|
||||||
|
|
|
@ -60,7 +60,7 @@ async function createRoom(content) {
|
||||||
*/
|
*/
|
||||||
async function joinRoom(roomIDOrAlias, mxid) {
|
async function joinRoom(roomIDOrAlias, mxid) {
|
||||||
/** @type {Ty.R.RoomJoined} */
|
/** @type {Ty.R.RoomJoined} */
|
||||||
const root = await mreq.mreq("POST", path(`/client/v3/join/${roomIDOrAlias}`, mxid))
|
const root = await mreq.mreq("POST", path(`/client/v3/join/${roomIDOrAlias}`, mxid), {})
|
||||||
return root.room_id
|
return root.room_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue