42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
294 stars 60 forks source link

Show scrollback in same channel/query window #393

Closed hloeung closed 3 years ago

hloeung commented 3 years ago

Rather than show as being from the "mattermost" user or in the "mattermost" query window, this shows scrollback text in the same window as the one we're requesting scrollback for. Fixes https://github.com/42wim/matterircd/issues/391

hloeung commented 3 years ago

It works for channel, but I can't seem to get it to work for DMs. I think I need to use u.MsgSpoofUser with the receiver / sender thingy like in mm-go-irckit/userbridge.go:

    if event.Sender.Me {
            if event.Receiver.Me {
                    u.MsgSpoofUser(u, u.Nick, event.Text)
            } else {
                    u.MsgSpoofUser(u, event.Receiver.Nick, event.Text)
            }

@42wim, what do you think?

hloeung commented 3 years ago

Okay, got something that works for both channel and DM/query.

42wim commented 3 years ago

very nice 👍