Man detained for terrorist joke