- # Conversations return all users except current user when current user is not only participant
- users = if length(participation.recipients) > 1 do
- Enum.reject(participation.recipients, &(&1.id == user.id))
- else
- participation.recipients
- end
+ # Conversations return all users except the current user,
+ # except when the current user is the only participant
+ users =
+ if length(participation.recipients) > 1 do
+ Enum.reject(participation.recipients, &(&1.id == user.id))
+ else
+ participation.recipients
+ end