From dc2dd4c787eeee681f1c92ebb7b1d670e92a63c4 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Fri, 26 Apr 2019 17:15:23 +0200 Subject: [PATCH] Add missing userID field to output payload --- internal/payload/outgoing.go | 3 ++- internal/payload/outgoing/message.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/payload/outgoing.go b/internal/payload/outgoing.go index 6eecf278b..2bf113b72 100644 --- a/internal/payload/outgoing.go +++ b/internal/payload/outgoing.go @@ -32,9 +32,10 @@ func Message(ctx context.Context, msg *messagingTypes.Message) *outgoing.Message return &outgoing.Message{ ID: msg.ID, + Type: string(msg.Type), ChannelID: Uint64toa(msg.ChannelID), Message: msg.Message, - Type: string(msg.Type), + UserID: msg.UserID, ReplyTo: msg.ReplyTo, Replies: msg.Replies, diff --git a/internal/payload/outgoing/message.go b/internal/payload/outgoing/message.go index 8e82b761f..0b0047823 100644 --- a/internal/payload/outgoing/message.go +++ b/internal/payload/outgoing/message.go @@ -7,16 +7,16 @@ import ( type ( Message struct { - ID uint64 `json:"ID,string"` + ID uint64 `json:"messageID,string"` Type string `json:"type"` Message string `json:"message"` ChannelID string `json:"channelID"` + UserID uint64 `json:"userID,string"` ReplyTo uint64 `json:"replyTo,omitempty,string"` Replies uint `json:"replies,omitempty"` RepliesFrom []string `json:"repliesFrom,omitempty"` - User *User `json:"user"` Attachment *Attachment `json:"att,omitempty"` Mentions MessageMentionSet `json:"mentions,omitempty"` Reactions MessageReactionSumSet `json:"reactions,omitempty"`