You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Discord replies have no context in IRC (even that they ARE a reply), leading to confusion.
Describe the solution you'd like
Discord replies -> IRC should include some level of context: that it's a reply at all, reply to a particular user, reply to a message at a particular timestamp, or the beginning of the parent message.
// Add our parent id if it exists, and if it's not referring to a message in another channel
if ref := m.MessageReference; ref != nil && ref.ChannelID == m.ChannelID {
rmsg.ParentID = ref.MessageID
}
(MessageReference is just an id, ReferencedMessage has the actual content)
I would do something along the lines of this (but better typed :p)
DESIRED_SNIPPET_LENGTH := 25
DISCORD_PARENT_CONTENT := "discord_parent_content"
// Add our parent id if it exists, and if it's not referring to a message in another channel.
// Also, include a snippet of the parent to let bridges include it when the id is unusable.
if ref := m.MessageReference; ref != nil && ref.ChannelID == m.ChannelID {
rmsg.ParentID = ref.MessageID
// Proper null safety here for best practice
rmsg.Extra[DISCORD_PARENT_CONTENT] = ref.ReferencedMessage.content[:DESIRED_SNIPPET_LENGTH-1]
}
Is your feature request related to a problem? Please describe.
Discord replies have no context in IRC (even that they ARE a reply), leading to confusion.
Describe the solution you'd like
Discord replies -> IRC should include some level of context: that it's a reply at all, reply to a particular user, reply to a message at a particular timestamp, or the beginning of the parent message.
Additional context
Quick and dirty pseudocode if there's interest in merging a tested PR:
In https://github.com/42wim/matterbridge/blob/master/bridge/discord/handlers.go#L85
In
(MessageReference is just an id, ReferencedMessage has the actual content)
I would do something along the lines of this (but better typed :p)
Then in IRC https://github.com/42wim/matterbridge/blob/master/bridge/irc/irc.go#L140
The text was updated successfully, but these errors were encountered: