Permalink
Browse files

Filter events generated by this bot

  • Loading branch information...
emk committed Aug 29, 2009
1 parent db4737e commit 2ffdd21b832b379e36f48636ba152a483caade0b
Showing with 12 additions and 9 deletions.
  1. +12 −9 src/buglinky/BugLinkyServlet.java
@@ -8,6 +8,7 @@
@SuppressWarnings("serial")
public class BugLinkyServlet extends AbstractRobotServlet {
+ private static final String ME = "buglinky@appspot.com";
private static final String LINK = "link/manual";
private static final Logger log =
Logger.getLogger(BugLinkyServlet.class.getName());
@@ -45,15 +46,17 @@ private void addInstructionsToWave(RobotMessageBundle bundle) {
/** Dispatch events to the appropriate handler method. */
private void dispatchEvents(RobotMessageBundle bundle) {
for (Event e: bundle.getEvents()) {
- switch (e.getType()) {
- // One or the other of these should be wired up in
- // capabilities.xml. If we use BLIP_SUBMITTED, we'll apply
- // our links once the user clicks "Done". If we use
- // BLIP_VERSION_CHANGED, we'll apply our links in real time.
- case BLIP_SUBMITTED:
- case BLIP_VERSION_CHANGED:
- addLinksToBlip(e.getBlip());
- break;
+ if (e.getModifiedBy() != ME) {
+ switch (e.getType()) {
+ // One or the other of these should be wired up in
+ // capabilities.xml. If we use BLIP_SUBMITTED, we'll apply
+ // our links once the user clicks "Done". If we use
+ // BLIP_VERSION_CHANGED, we'll apply our links in real time.
+ case BLIP_SUBMITTED:
+ case BLIP_VERSION_CHANGED:
+ addLinksToBlip(e.getBlip());
+ break;
+ }
}
}
}

0 comments on commit 2ffdd21

Please sign in to comment.