mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Show message when removing contact from group when not in group
This commit is contained in:
parent
265fff8f40
commit
dace47e5d3
@ -149,10 +149,18 @@ prof_handle_duck_result(const char * const result)
|
||||
}
|
||||
|
||||
void
|
||||
prof_handle_already_in_group(const char * const barejid,
|
||||
prof_handle_already_in_group(const char * const contact,
|
||||
const char * const group)
|
||||
{
|
||||
ui_contact_already_in_group(barejid, group);
|
||||
ui_contact_already_in_group(contact, group);
|
||||
ui_current_page_off();
|
||||
}
|
||||
|
||||
void
|
||||
prof_handle_not_in_group(const char * const contact,
|
||||
const char * const group)
|
||||
{
|
||||
ui_contact_not_in_group(contact, group);
|
||||
ui_current_page_off();
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ void prof_handle_duck_help(const char * const result);
|
||||
void prof_handle_duck_result(const char * const result);
|
||||
void prof_handle_roster_add(const char * const barejid, const char * const name);
|
||||
void prof_handle_roster_remove(const char * const barejid);
|
||||
void prof_handle_already_in_group(const char * const barejid, const char * const group);
|
||||
void prof_handle_already_in_group(const char * const contact, const char * const group);
|
||||
void prof_handle_not_in_group(const char * const contact, const char * const group);
|
||||
|
||||
#endif
|
||||
|
@ -456,9 +456,15 @@ ui_roster_remove(const char * const barejid)
|
||||
}
|
||||
|
||||
void
|
||||
ui_contact_already_in_group(const char * const barejid, const char * const group)
|
||||
ui_contact_already_in_group(const char * const contact, const char * const group)
|
||||
{
|
||||
cons_show("%s already in group %s", barejid, group);
|
||||
cons_show("%s already in group %s", contact, group);
|
||||
}
|
||||
|
||||
void
|
||||
ui_contact_not_in_group(const char * const contact, const char * const group)
|
||||
{
|
||||
cons_show("%s is not currently in group %s", contact, group);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -114,7 +114,8 @@ void ui_room_member_presence(const char * const room,
|
||||
const char * const nick, const char * const show, const char * const status);
|
||||
void ui_roster_add(const char * const barejid, const char * const name);
|
||||
void ui_roster_remove(const char * const barejid);
|
||||
void ui_contact_already_in_group(const char * const barejid, const char * const group);
|
||||
void ui_contact_already_in_group(const char * const contact, const char * const group);
|
||||
void ui_contact_not_in_group(const char * const contact, const char * const group);
|
||||
|
||||
// contact status functions
|
||||
void ui_status_room(const char * const contact);
|
||||
|
@ -326,6 +326,11 @@ roster_remove_from_group(const char * const group, const char * const barejid)
|
||||
|
||||
if (contact != NULL) {
|
||||
if (!p_contact_in_group(contact, group)) {
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
prof_handle_not_in_group(p_contact_name(contact), group);
|
||||
} else {
|
||||
prof_handle_not_in_group(p_contact_barejid(contact), group);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user