Checks if teacher is user before adding to invite list

pull/1116/head
Kelrap 2 years ago committed by GitHub
parent b56e3001ed
commit a4c930c629
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save