4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 06:19:23 +00:00

Add UserID to each message. Closes #200

This commit is contained in:
Wim
2017-06-18 15:44:54 +02:00
parent 2dd402675d
commit 2ddc4f7ae9
13 changed files with 20 additions and 12 deletions

View File

@ -21,6 +21,7 @@ type Api struct {
type ApiMessage struct {
Text string `json:"text"`
Username string `json:"username"`
UserID string `json:"userid"`
Avatar string `json:"avatar"`
Gateway string `json:"gateway"`
}
@ -81,6 +82,7 @@ func (b *Api) handlePostMessage(c echo.Context) error {
b.Remote <- config.Message{
Text: message.Text,
Username: message.Username,
UserID: message.UserID,
Channel: "api",
Avatar: message.Avatar,
Account: b.Account,