It doesn't seem aggressive, mischievous and playful. Seemed like it was mostly gesturing and just testing the guard, probably familiar with him if he's worked there for a long time.
If anything, those slaps were mildly annoying. Can't see how it would perceive them as an attack and it didn't respond as though they were