Campaigner Baroness Doreen Lawrence was “alerted” to a potential legal claim against the Daily Mail’s publisher by a text from the Duke of Sussex, the High Court has been told.