mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Merge branch 'master' into osx-functional
This commit is contained in:
commit
629d949692
@ -2665,10 +2665,15 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *barejid = p_contact_barejid(contact);
|
const char *barejid = p_contact_barejid(contact);
|
||||||
|
|
||||||
|
// TODO wait for result stanza before updating
|
||||||
|
const char *oldnick = p_contact_name(contact);
|
||||||
|
wins_change_nick(barejid, oldnick, name);
|
||||||
roster_change_name(contact, name);
|
roster_change_name(contact, name);
|
||||||
GSList *groups = p_contact_groups(contact);
|
GSList *groups = p_contact_groups(contact);
|
||||||
roster_send_name_change(barejid, name, groups);
|
roster_send_name_change(barejid, name, groups);
|
||||||
|
|
||||||
|
|
||||||
cons_show("Nickname for %s set to: %s.", jid, name);
|
cons_show("Nickname for %s set to: %s.", jid, name);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2693,6 +2698,10 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *barejid = p_contact_barejid(contact);
|
const char *barejid = p_contact_barejid(contact);
|
||||||
|
|
||||||
|
// TODO wait for result stanza before updating
|
||||||
|
const char *oldnick = p_contact_name(contact);
|
||||||
|
wins_remove_nick(barejid, oldnick);
|
||||||
roster_change_name(contact, NULL);
|
roster_change_name(contact, NULL);
|
||||||
GSList *groups = p_contact_groups(contact);
|
GSList *groups = p_contact_groups(contact);
|
||||||
roster_send_name_change(barejid, NULL, groups);
|
roster_send_name_change(barejid, NULL, groups);
|
||||||
|
@ -221,6 +221,32 @@ wins_private_nick_change(const char *const roomjid, const char *const oldnick, c
|
|||||||
jid_destroy(oldjid);
|
jid_destroy(oldjid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
wins_change_nick(const char *const barejid, const char *const oldnick, const char *const newnick)
|
||||||
|
{
|
||||||
|
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||||
|
if (chatwin) {
|
||||||
|
if (oldnick) {
|
||||||
|
autocomplete_remove(wins_ac, oldnick);
|
||||||
|
autocomplete_remove(wins_close_ac, oldnick);
|
||||||
|
}
|
||||||
|
autocomplete_add(wins_ac, newnick);
|
||||||
|
autocomplete_add(wins_close_ac, newnick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
wins_remove_nick(const char *const barejid, const char *const oldnick)
|
||||||
|
{
|
||||||
|
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||||
|
if (chatwin) {
|
||||||
|
if (oldnick) {
|
||||||
|
autocomplete_remove(wins_ac, oldnick);
|
||||||
|
autocomplete_remove(wins_close_ac, oldnick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ProfWin*
|
ProfWin*
|
||||||
wins_get_current(void)
|
wins_get_current(void)
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,8 @@ ProfWin* wins_new_private(const char *const fulljid);
|
|||||||
gboolean wins_chat_exists(const char *const barejid);
|
gboolean wins_chat_exists(const char *const barejid);
|
||||||
GList* wins_get_private_chats(const char *const roomjid);
|
GList* wins_get_private_chats(const char *const roomjid);
|
||||||
void wins_private_nick_change(const char *const roomjid, const char *const oldnick, const char *const newnick);
|
void wins_private_nick_change(const char *const roomjid, const char *const oldnick, const char *const newnick);
|
||||||
|
void wins_change_nick(const char *const barejid, const char *const oldnick, const char *const newnick);
|
||||||
|
void wins_remove_nick(const char *const barejid, const char *const oldnick);
|
||||||
|
|
||||||
ProfWin* wins_get_console(void);
|
ProfWin* wins_get_console(void);
|
||||||
ProfChatWin* wins_get_chat(const char *const barejid);
|
ProfChatWin* wins_get_chat(const char *const barejid);
|
||||||
|
Loading…
Reference in New Issue
Block a user