jersey/lightning
5
40
Fork
You've already forked lightning
11

messages edit immediately (spacebar->discord) #206

Open
opened 2026年06月15日 13:25:54 +02:00 by fei-chicory-blue · 7 comments

On my hosted version of the bot, it immediately edits every message that it sends from Spacebar to Discord (there's no issue in the opposite direction). The content doesn't change, but the "edited stamp" appears.

I thought it was a bug in the version I was using, but now that I updated to 27db5e5089 and it persists, I don't know what's causing this.

So far I tried restarting, deleting the binary and reinstalling, and clearing the database and recreating the bridge. There isn't any duplicate process running, and the config file hasn't changed. How can I figure out what's causing the issue?

On my hosted version of the bot, it immediately edits every message that it sends from Spacebar to Discord (there's no issue in the opposite direction). The content doesn't change, but the "edited stamp" appears. I thought it was a bug in the version I was using, but now that I updated to `27db5e5089` and it persists, I don't know what's causing this. So far I tried restarting, deleting the binary and reinstalling, and clearing the database and recreating the bridge. There isn't any duplicate process running, and the config file hasn't changed. How can I figure out what's causing the issue?

you could likely add logging to handleWrapper for each event that comes in from spacebar, and see if edits come in at the same/similar time as the original message. if that is the case, then that'd be a problem upstream, if not, that's likely our own bug

you could likely add logging to [handleWrapper](https://codeberg.org/jersey/lightning/src/commit/7158ebc18a595c2169a0914a36d9948f134c3f79/pkg/platforms/discord/internal/event.go#L14) for each event that comes in from spacebar, and see if edits come in at the same/similar time as the original message. if that is the case, then that'd be a problem upstream, if not, that's likely our own bug
jersey changed title from (削除) (Support) It is editing every message immediately? (削除ここまで) to messages edit immediately (spacebar->discord) 2026年06月21日 04:20:27 +02:00

Originally the reason I thought it's a bridge issue is I haven't updated Spacebar, only the bridge, but that's a good point.

I first tried now to download the latest version again but forgot @latest downloads v0.8.9. But interestingly on v0.8.9 the edit issue doesn't happen.

Unfortunately now I experience "database version must be d0.8.4 or higher. try running v0.8.9 or earlier", so I tried the way you described in #196 but this time after updating to 1bfb83f4b4, updating to the latest commit still gives me the error. Maybe I should try deleting the database and starting over on the latest commit?

Update: deleted the database and restarted on the latest commit! I will try the logging, though please don't expect something back soon since I don't have any experience with Go. Thanks for bearing with me.

Originally the reason I thought it's a bridge issue is I haven't updated Spacebar, only the bridge, but that's a good point. I first tried now to download the latest version again but forgot `@latest` downloads v0.8.9. But interestingly on v0.8.9 the edit issue doesn't happen. Unfortunately now I experience "database version must be d0.8.4 or higher. try running v0.8.9 or earlier", so I tried the way you described in https://codeberg.org/jersey/lightning/issues/196 but this time after updating to `1bfb83f4b4`, updating to the latest commit still gives me the error. Maybe I should try deleting the database and starting over on the latest commit? Update: deleted the database and restarted on the latest commit! I will try the logging, though please don't expect something back soon since I don't have any experience with Go. Thanks for bearing with me.

@fei-chicory-blue wrote in #206 (comment):

I first tried now to download the latest version again but forgot @latest downloads v0.8.9. But interestingly on v0.8.9 the edit issue doesn't happen.

i guess there's a chance this is a regression too, especially considering how much discord-related code has changed. though sorry about @latest not pointing to something resembling a real release, i keep putting that off

Unfortunately now I experience "database version must be d0.8.4 or higher. try running v0.8.9 or earlier", so I tried the way you described in #196 but this time after updating to 1bfb83f4b4, updating to the latest commit still gives me the error. Maybe I should try deleting the database and starting over on the latest commit?

Update: deleted the database and restarted on the latest commit!

database migrations currently suck, so honestly i don't even know what i'd do here other than hope for the best or to reset it entirely as you did

I will try the logging, though please don't expect something back soon since I don't have any experience with Go. Thanks for bearing with me.

if you need any help with this, please feel free to reach out! the codebase is a bit funky, but i'm willing to take a look at logging if that can help find a way to possibly fix this

@fei-chicory-blue wrote in https://codeberg.org/jersey/lightning/issues/206#issuecomment-17816546: > I first tried now to download the latest version again but forgot `@latest` downloads v0.8.9. But interestingly on v0.8.9 the edit issue doesn't happen. i guess there's a chance this is a regression too, especially considering how much discord-related code has changed. though sorry about `@latest` not pointing to something resembling a real release, i keep putting that off > Unfortunately now I experience "database version must be d0.8.4 or higher. try running v0.8.9 or earlier", so I tried the way you described in #196 but this time after updating to `1bfb83f4b4`, updating to the latest commit still gives me the error. Maybe I should try deleting the database and starting over on the latest commit? > > Update: deleted the database and restarted on the latest commit! database migrations currently suck, so honestly i don't even know what i'd do here other than hope for the best or to reset it entirely as you did > I will try the logging, though please don't expect something back soon since I don't have any experience with Go. Thanks for bearing with me. if you need any help with this, please feel free to reach out! the codebase is a bit funky, but i'm willing to take a look at logging if that can help find a way to possibly fix this

@fei-chicory-blue is this still a problem? i've made some more recent changes to message edit handling which may or may not impact this

@fei-chicory-blue is this still a problem? i've made some more recent changes to message edit handling which may or may not impact this

The edit issue persists, but thanks for letting me know to try it!

(Leaving a note here for myself just in case it become relevant in the future, that I did add the new column manually)

The edit issue persists, but thanks for letting me know to try it! (Leaving a note here for myself just in case it become relevant in the future, that I did add the new column manually)

what version of spacebar are you using? if you're using the latest version, it'll unconditionally emit MESSAGE_UPDATE events (unless a message doesn't contain a link) in case an autogenerated embed gets added (or not). see https://fermi.chat/channels/1006649183970562092/1470504048538844087/1525274127553590248

what version of spacebar are you using? if you're using the latest version, it'll unconditionally emit MESSAGE_UPDATE events (unless a message doesn't contain a link) in case an autogenerated embed gets added (or not). see https://fermi.chat/channels/1006649183970562092/1470504048538844087/1525274127553590248

It is running an older version from March: github.com/spacebarchat/server@6438953a4b
The edit issue started when I updated the bridge in June, so that's why I asked here, but could it be some bug with older Spacebar that happened to be ignored in older versions of the bridge?

The edits happen to every message, not just with links, so it doesn't seem related to the linked discussion.

It is running an older version from March: https://github.com/spacebarchat/server/commit/6438953a4ba1b885fb0f9e9df23c077875ec331f The edit issue started when I updated the bridge in June, so that's why I asked here, but could it be some bug with older Spacebar that happened to be ignored in older versions of the bridge? The edits happen to every message, not just with links, so it doesn't seem related to the linked discussion.
Sign in to join this conversation.
No Branch/Tag specified
develop
irc-debug-logging
fluxer-webhooks
mautrix-fork
pluralkit
xmpp
v0.8.9
v0.8.8
v0.8.7
v0.8.6
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.8.0-rc.12
v0.8.0-rc.11
v0.8.0-rc.10
v0.8.0-rc.9
v0.8.0-rc.8
v0.8.0-rc.7
v0.8.0-rc.6
v0.8.0-rc.5
v0.8.0-rc.4
v0.8.0-rc.3
v0.8.0-rc.2
v0.8.0-rc.1
v0.8.0-beta.13
v0.8.0-beta.12
v0.8.0-beta.11
v0.8.0-beta.10
v0.8.0-beta.9
v0.8.0-beta.8
v0.8.0-beta.7
v0.8.0-beta.6
v0.8.0-beta.5
v0.8.0-beta.4
v0.8.0-beta.3
v0.8.0-beta.2
v0.8.0-beta.1
v0.8.0-alpha.13
v0.8.0-alpha.12
v0.8.0-alpha.11
0.8.0-alpha.10
0.8.0-alpha.9
0.8.0-alpha.8
0.8.0-alpha.7
0.8.0-alpha.6
0.8.0-alpha.5
0.8.0-alpha.4
0.8.0-alpha.3
0.8.0-alpha.2
0.8.0-alpha.1
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.2a
0.6.2
0.6.1
0.6.0
0.5.8
0.5.7
0.5.6
0.5.5
0.4.13
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
Labels
Clear labels
scope
bolt
anything specific to the hosted product offered as bolt
scope
bridge
anything specific to the bridge application itself
scope
core
anything affecting the main framework
scope
discord
anything specific to the discord plugin
scope
epic
something which requires a large set of changes (new platforms, new types of things to bridge, etc.)
scope
irc
scope
matrix
anything specific to the matrix plugin
scope
osmium
scope
stoat
anything specific to the stoat plugin
scope
telegran
anything specific to the telegram plugin
status
blocked
this is blocked due to something else
status
deferred
status
question
further information is requested or a reproduction is needed
type
breaking
this would change something in a public api
type
bug
Something isn't working
type
build
the docker images and related scripts i think
type
dependencies
dependency-related things
type
documentation
Improvements or additions to documentation
type
enhancement
New feature or request
type
regression
a bug introduced by an update
Milestone
Clear milestone
No items
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jersey/lightning#206
Reference in a new issue
jersey/lightning
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?