bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
279 stars 49 forks source link

Added option to leave group #135

Open KamalGalrani opened 7 years ago

KamalGalrani commented 7 years ago

This pull request fetches group chats automatically on login and adds an option to leave a group chat. You can only leave group chats that appear in fbchats. To leave other groups first add them to fbchats using chat add facebook <thread_id> #<channel>

Usage

To leave group chats using fbchats index

> fbchats facebook
> fbleave facebook <index>

To leave group chats using thread id

> fbleave facebook <thread_id>
KamalGalrani commented 7 years ago

UPDATE:

To leave group chats using channel name

> fbleave facebook <channel_name>
dequis commented 7 years ago

Thanks but I'm not sure I like this approach. I'd prefer to reduce the amount of root commands added by this plugin - I was already working on removing fbjoin and fbchats.

Bitlbee specific code must not be used outside of facebook.c, since all the other files are shared with purple-facebook

KamalGalrani commented 7 years ago

The block is simply declaration of all the functions defined in facebook.c. I was using fb_cmd_fbchats in fb_login when I realized that the function is defined after fb_login. So I just put declaration of all the functions in the beginning of file for convenience. All but 2 declarations can be removed.

How are you planning to do away with fbjoin and fbchats?

I don't think there is any bitlbee specific code outside facebook.c in the pull request.

gautelund commented 6 years ago

I would like to see this feature. Can it be accepted or has something similar been implemented? Leaving facebook group chats.

Thaodan commented 3 years ago

Could you bridge it with /PART?