But... that wasn't a "straight" joke. A straight joke would be a joke that derived humor from people being straight. Your joke derived humor from the fact that your two friends were not straight. It was a gay joke that didn't use the word gay.
Any time you make a joke, whether it's appropriate or not tends to depend on the context (although there are some jokes which probably ought not be told in any context). In this case, your joke was inappropriate because you were using the fact that two of your friends were gay as fodder for humor. If there were such a thing as a "straight" joke, its appropriateness would depend on the joke and the situation in which you told it.
Any time you make a joke, whether it's appropriate or not tends to depend on the context (although there are some jokes which probably ought not be told in any context). In this case, your joke was inappropriate because you were using the fact that two of your friends were gay as fodder for humor. If there were such a thing as a "straight" joke, its appropriateness would depend on the joke and the situation in which you told it.