Checks if teacher is user before adding to invite list
This commit is contained in:
parent
b56e3001ed
commit
a4c930c629
1 changed files with 2 additions and 1 deletions
|
|
@ -87,7 +87,8 @@ extension PangeaClient on Client {
|
|||
final List<User> teachers = [];
|
||||
for (final classRoom in classesAndExchangesImIn) {
|
||||
for (final teacher in await classRoom.teachers) {
|
||||
if (!teachers.any((e) => e.id == teacher.id)) {
|
||||
// If person requesting list of teachers is a teacher in another classroom, don't add them to the list
|
||||
if (!teachers.any((e) => e.id == teacher.id) && userID != teacher.id) {
|
||||
teachers.add(teacher);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue