diff --git a/src/main/java/net/dv8tion/jda/api/events/message/react/MessageReactionAddEvent.java b/src/main/java/net/dv8tion/jda/api/events/message/react/MessageReactionAddEvent.java
index 56ed05719d..db2515f76b 100644
--- a/src/main/java/net/dv8tion/jda/api/events/message/react/MessageReactionAddEvent.java
+++ b/src/main/java/net/dv8tion/jda/api/events/message/react/MessageReactionAddEvent.java
@@ -40,9 +40,36 @@
*/
public class MessageReactionAddEvent extends GenericMessageReactionEvent
{
+ private final long messageAuthorId;
+
public MessageReactionAddEvent(@Nonnull JDA api, long responseNumber, @Nullable User user,
- @Nullable Member member, @Nonnull MessageReaction reaction, long userId)
+ @Nullable Member member, @Nonnull MessageReaction reaction, long userId, long messageAuthorId)
{
super(api, responseNumber, user, member, reaction, userId);
+ this.messageAuthorId = messageAuthorId;
+ }
+
+ /**
+ * The user id of the original message author.
+ *
This might be 0 for webhook messages.
+ *
+ * @return The user id of the original message author.
+ */
+ @Nonnull
+ public String getMessageAuthorId()
+ {
+ return Long.toUnsignedString(messageAuthorId);
+ }
+
+
+ /**
+ * The user id of the original message author.
+ *
This might be 0 for webhook messages.
+ *
+ * @return The user id of the original message author.
+ */
+ public long getMessageAuthorIdLong()
+ {
+ return messageAuthorId;
}
}
diff --git a/src/main/java/net/dv8tion/jda/internal/handle/MessageReactionHandler.java b/src/main/java/net/dv8tion/jda/internal/handle/MessageReactionHandler.java
index 5af5a40cf0..5e4178b425 100644
--- a/src/main/java/net/dv8tion/jda/internal/handle/MessageReactionHandler.java
+++ b/src/main/java/net/dv8tion/jda/internal/handle/MessageReactionHandler.java
@@ -176,7 +176,7 @@ protected Long handleInternally(DataObject content)
api.handleEvent(
new MessageReactionAddEvent(
api, responseNumber,
- user, member, reaction, userId));
+ user, member, reaction, userId, content.getUnsignedLong("message_author_id", 0L)));
}
else
{