A Romanian man should not have been fired for sending private messages at work, Europe’s top human rights court has ruled.