“Humour” is aggressive. The act of laughing—that is, baring the teeth and uttering sharp barking noises—is an instinctive response to internal threats. Strangely-behaving monkeys elicit laughter, driving potentially dangerous rogues away. Thus we enjoy laughing because it makes us feel secure by enforcing in-group conformity.
Having “jokes” which are shared only with a particular group indicates close in-group cohesion, but also intolerance to outside influence. If you regard closeness as meaning parochial disinclination to tolerate unexpected or iconoclastic words, thoughts, or actions, then yes, having “inside jokes” is an indication of closeness.