add UNINVITE command (#1171)

This commit is contained in:
Shivaram Lingamneni 2020-10-25 22:16:19 -04:00
parent 42d246b557
commit 4b1e6b04c4
5 changed files with 39 additions and 1 deletions

View file

@ -1787,6 +1787,12 @@ func (client *Client) Invite(casefoldedChannel string, channelCreatedAt time.Tim
return
}
func (client *Client) Uninvite(casefoldedChannel string) {
client.stateMutex.Lock()
defer client.stateMutex.Unlock()
delete(client.invitedTo, casefoldedChannel)
}
// Checks that the client was invited to join a given channel
func (client *Client) CheckInvited(casefoldedChannel string, createdTime time.Time) (invited bool) {
config := client.server.Config()