diff options
| author | Matias Goldfeld <[email protected]> | 2021-01-26 03:33:48 -0500 |
|---|---|---|
| committer | Matias Goldfeld <[email protected]> | 2021-01-26 03:33:48 -0500 |
| commit | a4afbc4c507419c5fd50c9403bc0bf6a53c92632 (patch) | |
| tree | c8d27cfc2fced85f634969b185d5f651c27915f2 /lib/models/guild | |
| parent | Add MRs to CI build (diff) | |
| download | disml-a4afbc4c507419c5fd50c9403bc0bf6a53c92632.tar.xz disml-a4afbc4c507419c5fd50c9403bc0bf6a53c92632.zip | |
Stated incompatability with new versions of decompress in disml.opam and made some small fixes to add compatability with new OCaml versions
Diffstat (limited to 'lib/models/guild')
| -rw-r--r-- | lib/models/guild/guild.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/guild/guild.ml b/lib/models/guild/guild.ml index 2559df6..95485a4 100644 --- a/lib/models/guild/guild.ml +++ b/lib/models/guild/guild.ml @@ -111,7 +111,7 @@ let unban_user ~id ?reason guild = in Http.guild_ban_remove (get_id guild) id payload
let get_member ~(id:User_id_t.t) guild =
- match List.find ~f:(fun m -> m.user.id = id) guild.members with
+ match List.find ~f:(fun m -> User_id.compare m.user.id id = 0) guild.members with
| Some m -> Deferred.Or_error.return m
| None ->
let `User_id id = id in
@@ -125,4 +125,4 @@ let get_channel ~(id:Channel_id_t.t) guild = (* TODO add HTTP fallback *)
let get_role ~(id:Role_id.t) guild =
- List.find ~f:(fun r -> r.id = id) guild.roles
+ List.find ~f:(fun r -> Role_id.get_id r.id = Role_id.get_id id) guild.roles
|