Remove commented-out get_cb_alias implementation
This commit is contained in:
19
src/lib.rs
19
src/lib.rs
@@ -140,7 +140,6 @@ impl purple::PrplPlugin for PurpleDelta {
|
||||
.enable_chat_send()
|
||||
.enable_convo_closed()
|
||||
.enable_get_chat_name()
|
||||
// .enable_get_cb_alias()
|
||||
.enable_list_icon()
|
||||
.enable_status_types()
|
||||
}
|
||||
@@ -331,24 +330,6 @@ impl purple::ConvoClosedHandler for PurpleDelta {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
impl purple::GetChatBuddyAlias for PurpleDelta {
|
||||
fn get_cb_alias(&mut self, connection: &mut Connection, id: i32, who: &str) -> Option<String> {
|
||||
log::info!("GetChatBuddyAlias: {}, {}", id, who);
|
||||
Conversation::find(connection, id).and_then(|mut c| {
|
||||
unsafe { c.get_data::<ChatInfo>(conv_data::CHAT_INFO) }.and_then(|info| {
|
||||
info.members.iter().find_map(|m| {
|
||||
if m.sn == who {
|
||||
m.friendly_name.clone()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
impl purple::GetChatNameHandler for PurpleDelta {
|
||||
fn get_chat_name(data: Option<&mut purple::StrHashTable>) -> Option<String> {
|
||||
data.and_then(|h| h.lookup(chat_info::SN.as_c_str()).map(Into::into))
|
||||
|
Reference in New Issue
Block a user