mirror of
https://github.com/matrix-construct/construct
synced 2024-06-10 22:18:54 +02:00
ircd:Ⓜ️:user::room: Add a one-liner is(user_room) test.
This commit is contained in:
parent
5f4b6d5f1a
commit
3a0bfc8db9
|
@ -29,4 +29,6 @@ struct ircd::m::user::room
|
|||
room() = default;
|
||||
room(const room &) = delete;
|
||||
room &operator=(const room &) = delete;
|
||||
|
||||
static bool is(const room::id &, const user::id &);
|
||||
};
|
||||
|
|
|
@ -2620,6 +2620,14 @@ ircd::m::user::room::room(const m::user &user,
|
|||
};
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::user::room::is(const room::id &room_id,
|
||||
const user::id &user_id)
|
||||
{
|
||||
const user::room user_room{user_id};
|
||||
return user_room.room_id == room_id;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// m/txn.h
|
||||
|
|
Loading…
Reference in a new issue