From a3f48ea91abac8af1abc82c592883e42eb7017ed Mon Sep 17 00:00:00 2001 From: kate Date: Mon, 7 Nov 2022 19:07:41 +0800 Subject: [PATCH 01/14] Fix dash ("-" char) in emoji names --- src/components/markdown/plugins/emoji.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/markdown/plugins/emoji.tsx b/src/components/markdown/plugins/emoji.tsx index 9993189d..eb424ab9 100644 --- a/src/components/markdown/plugins/emoji.tsx +++ b/src/components/markdown/plugins/emoji.tsx @@ -25,7 +25,7 @@ const Emoji = styled.img` } `; -const RE_EMOJI = /:([a-zA-Z0-9_+]+):/g; +const RE_EMOJI = /:([a-zA-Z0-9\-_+]+):/g; const RE_ULID = /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$/; export function RenderEmoji({ match }: CustomComponentProps) { From 302b79646500fe307e117c69e13efad069c349dc Mon Sep 17 00:00:00 2001 From: kate! Date: Wed, 9 Nov 2022 16:24:49 +0800 Subject: [PATCH 02/14] Remove unnecessary "one or more" operator in RE_EMOJI --- src/components/markdown/plugins/emoji.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/markdown/plugins/emoji.tsx b/src/components/markdown/plugins/emoji.tsx index eb424ab9..f1189502 100644 --- a/src/components/markdown/plugins/emoji.tsx +++ b/src/components/markdown/plugins/emoji.tsx @@ -25,7 +25,7 @@ const Emoji = styled.img` } `; -const RE_EMOJI = /:([a-zA-Z0-9\-_+]+):/g; +const RE_EMOJI = /:([a-zA-Z0-9\-_]+):/g; const RE_ULID = /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$/; export function RenderEmoji({ match }: CustomComponentProps) { From abdadbfa3ffdbdfa5de6acb71fcd1e79ca050342 Mon Sep 17 00:00:00 2001 From: kate Date: Fri, 2 Dec 2022 16:45:20 +0800 Subject: [PATCH 03/14] Fix broken stuff --- packages/components | 1 - packages/hast-util-table-cell-style | 1 - packages/revolt.js | 1 - 3 files changed, 3 deletions(-) delete mode 160000 packages/components delete mode 160000 packages/hast-util-table-cell-style delete mode 160000 packages/revolt.js diff --git a/packages/components b/packages/components deleted file mode 160000 index d314b2d1..00000000 --- a/packages/components +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d314b2d191124f1b487ebd72409e748c1bfccb87 diff --git a/packages/hast-util-table-cell-style b/packages/hast-util-table-cell-style deleted file mode 160000 index 7803fa54..00000000 --- a/packages/hast-util-table-cell-style +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7803fa54410a7ef9fc3149c482253e74ca1d7d71 diff --git a/packages/revolt.js b/packages/revolt.js deleted file mode 160000 index 39d1f596..00000000 --- a/packages/revolt.js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 39d1f596e280a28278d913e1e60e4d5298d71578 From 6767ea1853de60a8cdbf0c805a12100a460bb8e3 Mon Sep 17 00:00:00 2001 From: kate Date: Mon, 5 Dec 2022 22:42:43 +0800 Subject: [PATCH 04/14] fix(ci): typing issues; broken submodules (#826) * Remove broken submodules * Fix yarn typecheck * Add build:deps before typecheck to fix missing dependencies * fix: minor linting nitpick Co-authored-by: Sophie L --- Dockerfile | 1 + packages/components | 1 - packages/hast-util-table-cell-style | 1 - packages/revolt.js | 1 - .../common/messaging/MessageBox.tsx | 20 ++++++++++++++----- src/mobx/stores/Draft.ts | 2 +- src/pages/home/Home.tsx | 2 +- 7 files changed, 18 insertions(+), 10 deletions(-) delete mode 160000 packages/components delete mode 160000 packages/hast-util-table-cell-style delete mode 160000 packages/revolt.js diff --git a/Dockerfile b/Dockerfile index 8ee6bb04..0aa712d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ COPY . . COPY .env.build .env RUN yarn install --frozen-lockfile +RUN yarn build:deps RUN yarn typecheck RUN yarn build:highmem RUN yarn workspaces focus --production --all diff --git a/packages/components b/packages/components deleted file mode 160000 index d314b2d1..00000000 --- a/packages/components +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d314b2d191124f1b487ebd72409e748c1bfccb87 diff --git a/packages/hast-util-table-cell-style b/packages/hast-util-table-cell-style deleted file mode 160000 index 7803fa54..00000000 --- a/packages/hast-util-table-cell-style +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7803fa54410a7ef9fc3149c482253e74ca1d7d71 diff --git a/packages/revolt.js b/packages/revolt.js deleted file mode 160000 index 39d1f596..00000000 --- a/packages/revolt.js +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 39d1f596e280a28278d913e1e60e4d5298d71578 diff --git a/src/components/common/messaging/MessageBox.tsx b/src/components/common/messaging/MessageBox.tsx index 35b438cf..caaa6a84 100644 --- a/src/components/common/messaging/MessageBox.tsx +++ b/src/components/common/messaging/MessageBox.tsx @@ -45,6 +45,8 @@ import { PermissionTooltip } from "../Tooltip"; import FilePreview from "./bars/FilePreview"; import ReplyBar from "./bars/ReplyBar"; +import { DraftObject } from "../../../mobx/stores/Draft"; + type Props = { channel: Channel; }; @@ -277,7 +279,12 @@ export default observer(({ channel }: Props) => { // Push message content to draft. const setMessage = useCallback( - (content?: string) => state.draft.set(channel._id, content), + (content?: string) => { + const dobj: DraftObject = { + content + } + state.draft.set(channel._id, dobj) + }, [state.draft, channel._id], ); @@ -317,7 +324,7 @@ export default observer(({ channel }: Props) => { if (uploadState.type === "uploading" || uploadState.type === "sending") return; - const content = state.draft.get(channel._id)?.trim() ?? ""; + const content = state.draft.get(channel._id)?.content?.trim() ?? ""; if (uploadState.type === "attached") return sendFile(content); if (content.length === 0) return; @@ -526,7 +533,7 @@ export default observer(({ channel }: Props) => { } function isInCodeBlock(cursor: number): boolean { - const content = state.draft.get(channel._id) || ""; + const content = state.draft.get(channel._id)?.content || ""; const contentBeforeCursor = content.substring(0, cursor); let delimiterCount = 0; @@ -607,9 +614,12 @@ export default observer(({ channel }: Props) => { { const v = state.draft.get(channel._id); + const cnt: DraftObject = { + content: (v == null ? "" : `${v.content} `) + `:${emoji}:` + } state.draft.set( channel._id, - `${v ? `${v} ` : ""}:${emoji}:`, + cnt, ); }} onClose={closePicker} @@ -664,7 +674,7 @@ export default observer(({ channel }: Props) => { id="message" maxLength={2000} onKeyUp={onKeyUp} - value={state.draft.get(channel._id) ?? ""} + value={state.draft.get(channel._id)?.content ?? ""} padding="var(--message-box-padding)" onKeyDown={(e) => { if (e.ctrlKey && e.key === "Enter") { diff --git a/src/mobx/stores/Draft.ts b/src/mobx/stores/Draft.ts index 345351d7..de81ea8a 100644 --- a/src/mobx/stores/Draft.ts +++ b/src/mobx/stores/Draft.ts @@ -5,7 +5,7 @@ import { mapToRecord } from "../../lib/conversion"; import Persistent from "../interfaces/Persistent"; import Store from "../interfaces/Store"; -interface DraftObject { +export interface DraftObject { content?: string; masquerade?: { avatar: string; diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index f6c82ba1..1d6e6d2f 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -53,7 +53,7 @@ export default observer(() => { const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11; const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9 const snowflakes = useMemo(() => { - const flakes = []; + const flakes: string[] = []; if (isDecember) { for (let i = 0; i < 15; i++) { From 09be8c9e4f0c5d466d3cadd54bd0baec62ee507d Mon Sep 17 00:00:00 2001 From: Lea Date: Mon, 5 Dec 2022 15:44:47 +0100 Subject: [PATCH 05/14] feat: list custom emojis in autocomplete (#809) * feat: list custom emojis in autocomplete * fix: properly align emoji name in autocompletion --- src/components/common/AutoComplete.tsx | 94 ++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 14 deletions(-) diff --git a/src/components/common/AutoComplete.tsx b/src/components/common/AutoComplete.tsx index 72c0d885..0ba18214 100644 --- a/src/components/common/AutoComplete.tsx +++ b/src/components/common/AutoComplete.tsx @@ -1,4 +1,7 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import { Link } from "react-router-dom"; import { Channel, User } from "revolt.js"; +import { Emoji as CustomEmoji } from "revolt.js/esm/maps/Emojis"; import styled, { css } from "styled-components/macro"; import { StateUpdater, useState } from "preact/hooks"; @@ -7,6 +10,8 @@ import { emojiDictionary } from "../../assets/emojis"; import { useClient } from "../../controllers/client/ClientController"; import ChannelIcon from "./ChannelIcon"; import Emoji from "./Emoji"; +import ServerIcon from "./ServerIcon"; +import Tooltip from "./Tooltip"; import UserIcon from "./user/UserIcon"; export type AutoCompleteState = @@ -14,7 +19,7 @@ export type AutoCompleteState = | ({ selected: number; within: boolean } & ( | { type: "emoji"; - matches: string[]; + matches: (string | CustomEmoji)[]; } | { type: "user"; @@ -104,16 +109,23 @@ export function useAutoComplete( if (type === "emoji") { // ! TODO: we should convert it to a Binary Search Tree and use that - const matches = Object.keys(emojiDictionary) - .filter((emoji: string) => emoji.match(regex)) - .splice(0, 5); + const matches = [ + ...Object.keys(emojiDictionary).filter((emoji: string) => + emoji.match(regex), + ), + ...Array.from(client.emojis.values()).filter((emoji) => + emoji.name.match(regex), + ), + ].splice(0, 5); if (matches.length > 0) { const currentPosition = state.type !== "none" ? state.selected : 0; setState({ + // @ts-ignore-next-line are you high type: "emoji", + // @ts-ignore-next-line matches, selected: Math.min(currentPosition, matches.length - 1), within: false, @@ -233,10 +245,13 @@ export function useAutoComplete( const content = el.value.split(""); if (state.type === "emoji") { + const selected = state.matches[state.selected]; content.splice( index, search.length, - state.matches[state.selected], + selected instanceof CustomEmoji + ? selected._id + : selected, ": ", ); } else if (state.type === "user") { @@ -388,12 +403,17 @@ export default function AutoComplete({ setState, onClick, }: Pick) { + const client = useClient(); return (
{state.type === "emoji" && state.matches.map((match, i) => ( ))} {state.type === "user" && From fcf6812151d73460a5caba0a357a37b04ee47287 Mon Sep 17 00:00:00 2001 From: Lea Date: Mon, 5 Dec 2022 15:47:04 +0100 Subject: [PATCH 06/14] feat: allow rolt.chat for relative navigation (#814) --- src/lib/links.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/links.ts b/src/lib/links.ts index 211c91d6..269e84de 100644 --- a/src/lib/links.ts +++ b/src/lib/links.ts @@ -17,6 +17,7 @@ const ALLOWED_ORIGINS = [ "app.revolt.chat", "nightly.revolt.chat", "local.revolt.chat", + "rolt.chat", ]; /** From dadf0b63297ce15c925314668dbcb650a369de6d Mon Sep 17 00:00:00 2001 From: Sophie L Date: Tue, 24 Jan 2023 17:55:04 +0000 Subject: [PATCH 07/14] fix: update draft check (#830) --- src/mobx/stores/Draft.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mobx/stores/Draft.ts b/src/mobx/stores/Draft.ts index de81ea8a..7c5fcaaa 100644 --- a/src/mobx/stores/Draft.ts +++ b/src/mobx/stores/Draft.ts @@ -59,10 +59,12 @@ export default class Draft implements Store, Persistent { * @param channel Channel ID */ @computed has(channel: string) { - return ( - this.drafts.has(channel) && - this.drafts.get(channel)!.content!.length > 0 - ); + if (!this.drafts.has(channel)) return false; + // fetch the draft object + const potentialDraft = this.drafts.get(channel)?.content; + // if it doesn't have any content return false + if (!potentialDraft) return false; + return potentialDraft.length > 0; } /** From 89b3c9c098da180d9122236f3cd363aa363081b9 Mon Sep 17 00:00:00 2001 From: kate Date: Wed, 25 Jan 2023 01:55:17 +0800 Subject: [PATCH 08/14] fix: dash ("-" char) in emoji names (#816) --- src/components/markdown/plugins/emoji.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/markdown/plugins/emoji.tsx b/src/components/markdown/plugins/emoji.tsx index 9993189d..f1189502 100644 --- a/src/components/markdown/plugins/emoji.tsx +++ b/src/components/markdown/plugins/emoji.tsx @@ -25,7 +25,7 @@ const Emoji = styled.img` } `; -const RE_EMOJI = /:([a-zA-Z0-9_+]+):/g; +const RE_EMOJI = /:([a-zA-Z0-9\-_]+):/g; const RE_ULID = /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$/; export function RenderEmoji({ match }: CustomComponentProps) { From e34c5c99fea6ed51f78e8944985bd13af73454e4 Mon Sep 17 00:00:00 2001 From: cheneyni-451 <56236030+cheneyni-451@users.noreply.github.com> Date: Tue, 24 Jan 2023 12:56:50 -0500 Subject: [PATCH 09/14] fix(ui): add margin to delete role button (#802) Co-authored-by: Cheney Ni --- src/pages/settings/server/Roles.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/server/Roles.tsx b/src/pages/settings/server/Roles.tsx index a46c87bd..7527bb51 100644 --- a/src/pages/settings/server/Roles.tsx +++ b/src/pages/settings/server/Roles.tsx @@ -70,6 +70,10 @@ export const Roles = observer(({ server }: Props) => { } `; + const DeleteRoleButton = styled(Button)` + margin: 16px 0; + `; + return ( {

- + )}
From 2f43a2c32d9843c6c41d0bf78c093068705682ee Mon Sep 17 00:00:00 2001 From: Leda Date: Tue, 24 Jan 2023 17:59:31 +0000 Subject: [PATCH 10/14] fix: category title input reverts to span on empty string (#699) Fixes https://github.com/revoltchat/revite/issues/693 --- src/pages/settings/server/Categories.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/settings/server/Categories.tsx b/src/pages/settings/server/Categories.tsx index f9f4bc43..4da61297 100644 --- a/src/pages/settings/server/Categories.tsx +++ b/src/pages/settings/server/Categories.tsx @@ -340,11 +340,13 @@ function ListElement({ const save = useCallback(() => { setEditing(undefined); - setTitle!(editing!); + if (editing !== "") { + setTitle!(editing!); + } }, [editing, setTitle]); useEffect(() => { - if (!editing) return; + if (editing === undefined) return; function onClick(ev: MouseEvent) { if ((ev.target as HTMLElement)?.id !== category.id) { @@ -368,7 +370,7 @@ function ListElement({
- {editing ? ( + {editing !== undefined ? ( From 6c08ccff52c418a2cacf7522a96f125ee140077f Mon Sep 17 00:00:00 2001 From: insertish Date: Tue, 24 Jan 2023 19:43:32 +0000 Subject: [PATCH 11/14] ci: synced local '.github/workflows/triage_issue.yml' with remote 'workflows/triage_issue.yml' [skip ci] --- .github/workflows/triage_issue.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/triage_issue.yml b/.github/workflows/triage_issue.yml index b625a98b..ecc69f59 100644 --- a/.github/workflows/triage_issue.yml +++ b/.github/workflows/triage_issue.yml @@ -15,22 +15,27 @@ jobs: gh api graphql -f query=' query { organization(login: "revoltchat"){ - projectNext(number: 3) { + projectV2(number: 3) { id fields(first:20) { nodes { - id - name - settings + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } } } } } }' > project_data.json - echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'TODO_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV + echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV + echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV - name: Add issue to project env: @@ -39,11 +44,11 @@ jobs: run: | item_id="$( gh api graphql -f query=' mutation($project:ID!, $issue:ID!) { - addProjectNextItem(input: {projectId: $project, contentId: $issue}) { - projectNextItem { + addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) { + item { id } } - }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')" - + }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')" + echo 'ITEM_ID='$item_id >> $GITHUB_ENV From a9f23fe0e33ffda3acdef5076dc07d357531a0a8 Mon Sep 17 00:00:00 2001 From: insertish Date: Tue, 24 Jan 2023 19:43:32 +0000 Subject: [PATCH 12/14] ci: synced local '.github/workflows/triage_pr.yml' with remote 'workflows/triage_pr.yml' [skip ci] --- .github/workflows/triage_pr.yml | 37 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/triage_pr.yml b/.github/workflows/triage_pr.yml index df07fe88..de5a9421 100644 --- a/.github/workflows/triage_pr.yml +++ b/.github/workflows/triage_pr.yml @@ -15,22 +15,27 @@ jobs: gh api graphql -f query=' query { organization(login: "revoltchat"){ - projectNext(number: 3) { + projectV2(number: 3) { id fields(first:20) { nodes { - id - name - settings + ... on ProjectV2SingleSelectField { + id + name + options { + id + name + } + } } } } } }' > project_data.json - echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'INCOMING_OPTION_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Status") |.settings | fromjson.options[] | select(.name=="Incoming PRs") |.id' project_data.json) >> $GITHUB_ENV + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV + echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV + echo 'INCOMING_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Incoming PRs") |.id' project_data.json) >> $GITHUB_ENV - name: Add PR to project env: @@ -39,13 +44,13 @@ jobs: run: | item_id="$( gh api graphql -f query=' mutation($project:ID!, $pr:ID!) { - addProjectNextItem(input: {projectId: $project, contentId: $pr}) { - projectNextItem { + addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { + item { id } } - }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')" - + }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" + echo 'ITEM_ID='$item_id >> $GITHUB_ENV - name: Set fields @@ -59,14 +64,16 @@ jobs: $status_field: ID! $status_value: String! ) { - set_status: updateProjectNextItemField(input: { + set_status: updateProjectV2ItemFieldValue(input: { projectId: $project itemId: $item fieldId: $status_field - value: $status_value + value: { + singleSelectOptionId: $status_value + } }) { - projectNextItem { + projectV2Item { id - } + } } }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.INCOMING_OPTION_ID }} --silent From 34ce1d1a867ffc122ec0201976410c047e08a9b0 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 29 Jan 2023 17:33:42 +0000 Subject: [PATCH 13/14] chore: bump submodule dependencies --- external/lang | 2 +- external/revolt.js | 2 +- yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/external/lang b/external/lang index f95ec6dc..4eec9dd0 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit f95ec6dc8200adba7925425d4cf2ae0c16f049c3 +Subproject commit 4eec9dd02afa6a7f9b68c336282d4819b9c30790 diff --git a/external/revolt.js b/external/revolt.js index ab064f41..e1a98853 160000 --- a/external/revolt.js +++ b/external/revolt.js @@ -1 +1 @@ -Subproject commit ab064f41a4154acee7c1751ea5b59d9ee4345a0b +Subproject commit e1a98853b49adb78698af175e8b7c971ef501d5b diff --git a/yarn.lock b/yarn.lock index 4afa15be..ca79c65f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8016,14 +8016,14 @@ __metadata: languageName: node linkType: hard -"revolt-api@npm:0.5.5-4": - version: 0.5.5-4 - resolution: "revolt-api@npm:0.5.5-4" +"revolt-api@npm:0.5.7": + version: 0.5.7 + resolution: "revolt-api@npm:0.5.7" dependencies: "@insertish/oapi": 0.1.18 axios: ^0.26.1 lodash.defaultsdeep: ^4.6.1 - checksum: dfb374d58f1b8b5a6de2e7fa05e386b3df3ffb85a450a6894f23c6b9760af8bff0d198d8352063c33084f0dbc6ff84a234300efb0c62c7b27f709887402787f1 + checksum: ce5d24f1f71c039789b71c33cce12a9bc1ee4709e2c37f88ac95caff193096ff4f5e90fd48ba0ed6f6bbb71d080cd410f8ba8a3998da8bd8083766a016b18306 languageName: node linkType: hard @@ -8040,7 +8040,7 @@ __metadata: lodash.isequal: ^4.5.0 long: ^5.2.0 mobx: ^6.3.2 - revolt-api: 0.5.5-4 + revolt-api: 0.5.7 ulid: ^2.3.0 ws: ^8.2.2 languageName: node From 95d4f61d7f2380710d138a99df77c5391f5b4bba Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 29 Jan 2023 17:34:07 +0000 Subject: [PATCH 14/14] feat: support Streamable embeds --- src/components/common/messaging/embed/Embed.tsx | 3 ++- src/components/common/messaging/embed/EmbedMedia.tsx | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/common/messaging/embed/Embed.tsx b/src/components/common/messaging/embed/Embed.tsx index 3d04c44f..ce63c1aa 100644 --- a/src/components/common/messaging/embed/Embed.tsx +++ b/src/components/common/messaging/embed/Embed.tsx @@ -67,7 +67,8 @@ export default function Embed({ embed }: Props) { break; } case "Twitch": - case "Lightspeed": { + case "Lightspeed": + case "Streamable": { mw = 1280; mh = 720; break; diff --git a/src/components/common/messaging/embed/EmbedMedia.tsx b/src/components/common/messaging/embed/EmbedMedia.tsx index 53723d27..fca1cedc 100644 --- a/src/components/common/messaging/embed/EmbedMedia.tsx +++ b/src/components/common/messaging/embed/EmbedMedia.tsx @@ -92,6 +92,16 @@ export default function EmbedMedia({ embed, width, height }: Props) { /> ); } + case "Streamable": { + return ( +