iijlab / direct-hs

Client library for https://direct4b.com in Haskell
8 stars 1 forks source link

🆕 Add `clientCurrentDomain` to `Client` #49

Closed igrep closed 6 years ago

igrep commented 6 years ago

Problem

It's cumbersome for the library users to specify domain ID to use some APIs. Before this commit, createPairTalk implicitly calls getDomains to obtain all domains the logged-in user belongs to, then choose the first domain's ID from the result.

But there're several problems in this way:

Solution