@@ -131,7 +131,7 @@ public async Task<Image> GetMessagePersonProfileImageAsync(MessagePerson person,
131131
132132#if NET47 || NET481
133133 Image image = Image . FromStream ( await response . Content . ReadAsStreamAsync ( ) ) ;
134-
134+
135135 if ( image . Height == image . Width )
136136 return image ;
137137
@@ -230,14 +230,14 @@ public async Task<GeneralAccount> GetGenerallyAccountInformationAsync(Cancellati
230230 /// <exception cref="HttpRequestException">Thrown when an error happened while the http request</exception>
231231 public async Task < ( ContactDetails contact , bool canRead , bool canWrite ) > GetContactDetailsAsync ( CancellationToken ct = default )
232232 {
233- string responseString = await MakeAPIGetRequestAsync ( $ "/WebUntis/api/profile/contactdetails?personId={ User . Id } &isRequestForStudent={ UserType is Client . UserType . Student } ", ct ) ;
233+ string responseString = await MakeAPIGetRequestAsync ( $ "/WebUntis/api/profile/contactdetails?personId={ User . Id } &isRequestForStudent=false ", ct ) ;
234234 JObject data = JObject . Parse ( responseString ) [ "data" ] . Value < JObject > ( ) ;
235235
236236 if ( ! data [ "read" ] . Value < bool > ( ) ) // Return null when you do not have a read permission
237237 return ( null , false , data [ "write" ] . Value < bool > ( ) ) ;
238238
239239 ContactDetails contact = data [ "address" ] . ToObject < ContactDetails > ( ) ;
240- return ( contact , true , data [ "write" ] . Value < bool > ( ) ) ;
240+ return ( contact , data [ "read" ] . Value < bool > ( ) , data [ "write" ] . Value < bool > ( ) ) ;
241241 }
242242
243243 /// <summary>
@@ -289,7 +289,7 @@ public async Task<GeneralAccount> GetGenerallyAccountInformationAsync(Cancellati
289289 throw new HttpRequestException ( $ "There was an error while the http request (Code: { response . StatusCode } ).") ;
290290
291291#if NET47 || NET481
292- Image image = Image . FromStream ( await response . Content . ReadAsStreamAsync ( ) ) ;
292+ Image image = Image . FromStream ( await response . Content . ReadAsStreamAsync ( ) ) ;
293293#elif NET6_0_OR_GREATER
294294 Image image = await Image . LoadAsync ( await response . Content . ReadAsStreamAsync ( ct ) , ct ) ;
295295#endif
0 commit comments