FriendsOfFlarum / byobu

Well integrated, advanced private discussions for your Flarum forum.
https://discuss.flarum.org/d/4762-flagrow-by-bu-well-integrated-advanced-private-discussions
MIT License
54 stars 33 forks source link

Notifications improvements #89

Closed imorland closed 4 years ago

imorland commented 4 years ago
Screenshot 2020-02-14 at 19 52 33

Addresses #75

dsevillamartin commented 4 years ago

Won't that always return truthy, as it returns a collection of users (even if it's empty)? Perhaps make it ->recipientUsers()->count() (I think that's a method on eloquent relationship... Not sure) or recipientIsers->length.

Either way, I'm not sure it the curre t condition is ever falsy.

imorland commented 4 years ago

recipientUsers is only present on a byobu discussion, so my understanding is that it will only return true if it’s a byobu private discussion.

It certainly appears to work from some local testing.

imorland commented 4 years ago

I’ll step over it with the debugger attached tomorrow to double check

imorland commented 4 years ago

@datitisev just had a chance to check this out, you were correct, i've updated accordingly :)