mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 01:49:22 +00:00
Add Gateway's name to RemoteNickFormat (#501)
In order to support extra use cases we should add the `{GATEWAY}` tag to the `RemoteNickFormat` string which would be replaced by the value of the `name=` field from a gateway's configuration. This is _very_ useful when you are forwarding, for example, multiple channels from one chat to a single channel on another one (one-way). It will help you identify the source channel of a message on the target chat.
This commit is contained in:
@ -344,7 +344,7 @@ func (m *MMClient) parseActionPost(rmsg *Message) {
|
||||
data := model.PostFromJson(strings.NewReader(rmsg.Raw.Data["post"].(string)))
|
||||
// we don't have the user, refresh the userlist
|
||||
if m.GetUser(data.UserId) == nil {
|
||||
m.log.Infof("User %s is not known, ignoring message %s", data)
|
||||
m.log.Infof("User %s is not known, ignoring message %s", data.UserId, data.Message)
|
||||
return
|
||||
}
|
||||
rmsg.Username = m.GetUserName(data.UserId)
|
||||
|
Reference in New Issue
Block a user