Glimesh / glimesh.tv

Glimesh is a next generation live streaming platform built by the community, for the community.
https://glimesh.tv
Other
465 stars 77 forks source link

get_channel_moderator/2 in stream_moderation.ex returns unauthorized on new mod creation #851

Open mja00 opened 2 years ago

mja00 commented 2 years ago

Looks for some reason the chan_mod variable isn't fully initialized when this function is called right after a moderator is created, which throws a fake unauthorized error.

https://github.com/Glimesh/glimesh.tv/blob/dev/lib/glimesh/stream_moderation.ex#L26= is the line that it happens on.

Not really too sure why this would return nil unless it's just too fast and the DB hasn't updated yet.