Skip to content

Commit

Permalink
all: init v2 and delete old bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 15, 2024
1 parent 64c92ca commit 0a7b8bf
Show file tree
Hide file tree
Showing 87 changed files with 458 additions and 13,224 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.21", "1.22"]
name: Lint ${{ matrix.go-version == '1.22' && '(latest)' || '(old)' }}
go-version: ["1.22", "1.23"]
name: Lint ${{ matrix.go-version == '1.23' && '(latest)' || '(old)' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -23,9 +23,10 @@ jobs:
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3

- name: Install goimports
- name: Install dependencies
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
export PATH="$HOME/go/bin:$PATH"
- name: Install pre-commit
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include:
- project: 'mautrix/ci'
file: '/go.yml'
file: '/gov2-as-default.yml'
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude_types: [markdown]
Expand All @@ -12,9 +12,15 @@ repos:
rev: v1.0.0-rc.1
hooks:
- id: go-imports-repo
args:
- "-local"
- "go.mau.fi/mautrix-discord"
- "-w"
- id: go-vet-repo-mod
- id: go-staticcheck-repo-mod

- repo: https://github.com/beeper/pre-commit-go
rev: v0.3.1
hooks:
- id: zerolog-ban-msgf
- id: zerolog-use-stringer
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v0.8.0 (unreleased)

* Bumped minimum Go version to 1.22.
* Rewrote bridge using bridgev2 architecture.
* It is recommended to check the config file after upgrading. If you have
prevented the bridge from writing to the config, you should update it
manually.

# v0.7.0 (2024-07-16)

* Bumped minimum Go version to 1.21.
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
FROM dock.mau.dev/tulir/lottieconverter:alpine-3.18 AS lottie
FROM dock.mau.dev/tulir/lottieconverter:alpine-3.19 AS lottie

FROM golang:1-alpine3.18 AS builder
FROM golang:1-alpine3.20 AS builder

RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev

COPY . /build
WORKDIR /build
RUN go build -o /usr/bin/mautrix-discord

FROM alpine:3.18
FROM alpine:3.20

ENV UID=1337 \
GID=1337

RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq curl \
RUN apk add --no-cache ffmpeg su-exec ca-certificates olm bash jq yq-go curl \
zlib libpng giflib libstdc++ libgcc

COPY --from=lottie /usr/lib/librlottie.so* /usr/lib/
COPY --from=lottie /usr/local/bin/lottieconverter /usr/local/bin/lottieconverter
COPY --from=builder /usr/bin/mautrix-discord /usr/bin/mautrix-discord
COPY --from=builder /build/example-config.yaml /opt/mautrix-discord/example-config.yaml
COPY --from=builder /build/docker-run.sh /docker-run.sh
VOLUME /data

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM dock.mau.dev/tulir/lottieconverter:alpine-3.18 AS lottie
FROM dock.mau.dev/tulir/lottieconverter:alpine-3.19 AS lottie

FROM alpine:3.18
FROM alpine:3.20

ENV UID=1337 \
GID=1337

RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq \
RUN apk add --no-cache ffmpeg su-exec ca-certificates bash jq curl yq-go \
zlib libpng giflib libstdc++ libgcc

COPY --from=lottie /usr/lib/librlottie.so* /usr/lib/
COPY --from=lottie /usr/local/bin/lottieconverter /usr/local/bin/lottieconverter
ARG EXECUTABLE=./mautrix-discord
COPY $EXECUTABLE /usr/bin/mautrix-discord
COPY ./example-config.yaml /opt/mautrix-discord/example-config.yaml
COPY ./docker-run.sh /docker-run.sh
VOLUME /data

Expand Down
18 changes: 0 additions & 18 deletions Dockerfile.dev

This file was deleted.

12 changes: 12 additions & 0 deletions LICENSE.exceptions
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The mautrix-discord developers grant the following special exceptions:

* to Beeper the right to embed the program in the Beeper clients and servers,
and use and distribute the collective work without applying the license to
the whole.
* to Element the right to distribute compiled binaries of the program as a part
of the Element Server Suite and other server bundles without applying the
license.

All exceptions are only valid under the condition that any modifications to
the source code of mautrix-discord remain publicly available under the terms
of the GNU AGPL version 3 or later.
79 changes: 40 additions & 39 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Features & roadmap
* Matrix → Discord
* [ ] Message content
* [x] Plain text
* [x] Formatted messages
* [x] Media/files
* [x] Replies
* [x] Threads
* [ ] Plain text
* [ ] Formatted messages
* [ ] Media/files
* [ ] Replies
* [ ] Threads
* [ ] Custom emojis
* [x] Message redactions
* [x] Reactions
* [x] Unicode emojis
* [ ] Message redactions
* [ ] Reactions
* [ ] Unicode emojis
* [ ] Custom emojis (re-reacting with custom emojis sent from Discord already works)
* [ ] Executing Discord bot commands
* [x] Basic arguments and subcommands
* [ ] Basic arguments and subcommands
* [ ] Subcommand groups
* [ ] Mention arguments
* [ ] Attachment arguments
* [ ] Presence
* [x] Typing notifications
* [x] Own read status
* [ ] Typing notifications
* [ ] Own read status
* [ ] Power level
* [ ] Membership actions
* [ ] Invite
Expand All @@ -31,49 +31,50 @@
* [ ] Initial room metadata
* Discord → Matrix
* [ ] Message content
* [x] Plain text
* [x] Formatted messages
* [x] Media/files
* [x] Replies
* [x] Threads
* [x] Auto-joining threads when opening
* [ ] Plain text
* [ ] Formatted messages
* [ ] Media/files
* [ ] Replies
* [ ] Threads
* [ ] Auto-joining threads when opening
* [ ] Backfilling threads after joining
* [x] Custom emojis
* [x] Embeds
* [ ] Custom emojis
* [ ] Embeds
* [ ] Interactive components
* [x] Interactions (commands)
* [x] @everyone/@here mentions into @room
* [x] Message deletions
* [x] Reactions
* [x] Unicode emojis
* [x] Custom emojis ([MSC4027](https://github.com/matrix-org/matrix-spec-proposals/pull/4027))
* [x] Avatars
* [ ] Interactions (commands)
* [ ] @everyone/@here mentions into @room
* [ ] Message deletions
* [ ] Reactions
* [ ] Unicode emojis
* [ ] Custom emojis ([MSC4027](https://github.com/matrix-org/matrix-spec-proposals/pull/4027))
* [ ] Avatars
* [ ] Presence
* [ ] Typing notifications (currently partial support: DMs work after you type in them)
* [x] Own read status
* [ ] Own read status
* [ ] Role permissions
* [ ] Membership actions
* [ ] Invite
* [ ] Join
* [ ] Leave
* [ ] Kick
* [x] Channel/group DM metadata changes
* [x] Title
* [x] Avatar
* [x] Description
* [x] Initial channel/group DM metadata
* [ ] Channel/group DM metadata changes
* [ ] Title
* [ ] Avatar
* [ ] Description
* [ ] Initial channel/group DM metadata
* [ ] User metadata changes
* [ ] Display name
* [ ] Avatar
* [ ] Initial user metadata
* [ ] Display name
* [ ] Avatar
* Misc
* [x] Login methods
* [x] QR scan from mobile
* [x] Manually providing access token
* [x] Automatic portal creation
* [x] After login
* [x] When receiving DM
* [ ] Login methods
* [ ] QR scan from mobile
* [ ] Username/password
* [ ] Manually providing access token
* [ ] Automatic portal creation
* [ ] After login
* [ ] When receiving DM
* [ ] Private chat creation by inviting Matrix puppet of Discord user to new room
* [x] Option to use own Matrix account for messages sent from other Discord clients
* [ ] Option to use own Matrix account for messages sent from other Discord clients
Loading

0 comments on commit 0a7b8bf

Please sign in to comment.