Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve events: Tag access directly in most. Separate rare multi-server-message events. #262

Draft
merged 2 commits into from Mar 10, 2019

Conversation

Projects
None yet
2 participants
@mbax
Copy link
Member

mbax commented Mar 9, 2019

Events are now by default containing a single original message, since
most events are really triggered by such. This allows for making message
tags more accessible for most events. The handful of events that come
from multiple messages are now treated separately for storing original
messages.

This will break any calls to getOriginalMessages on most events, since
the method has been replaced. Since most usage of that was to call
tag-getting methods, it can be directly replaced by event.getTag...
methods.

@mbax mbax added this to the 7.0.0 milestone Mar 9, 2019

@mbax mbax self-assigned this Mar 9, 2019

@mbax mbax referenced this pull request Mar 9, 2019

Closed

Getting a message's tags #261

* @param actor the actor
* @param channel the channel
* @param message the message
*/
protected ActorChannelMessageEventBase(@NonNull Client client, @NonNull List<ServerMessage> originalMessages, @NonNull A actor, @NonNull Channel channel, @NonNull String message) {
super(client, originalMessages, actor, channel);

This comment has been minimized.

@Zarthus

Zarthus Mar 9, 2019

Member

maybe document more clearly the diff between getMessage() and getOriginalMessage()

This comment has been minimized.

@mbax

mbax Mar 9, 2019

Author Member

@mbax mbax force-pushed the next branch from b4d3744 to 6cb3555 Mar 10, 2019

mbax added some commits Mar 9, 2019

[BREAKING] Refactor events:
Events are now by default containing a single original message, since
most events are really triggered by such. This allows for making message
tags more accessible for most events. The handful of events that come
from multiple messages are now treated separately for storing original
messages.

This will break any calls to getOriginalMessages on most events, since
the method has been replaced. Since most usage of that was to call
tag-getting methods, it can be directly replaced by event.getTag...
methods.

@mbax mbax force-pushed the 7.0-event-singularity branch from d406401 to 468281d Mar 10, 2019

@mbax mbax merged commit 468281d into next Mar 10, 2019

1 check was pending

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.