Bug 920801 - Port chat/ changes from Instantbird to comm-central - 6 - Bio 2088 - New contact does not get added to the correct tag, r=clokep.
This commit is contained in:
Родитель
c7b8ea9ea6
Коммит
f40228c43a
|
@ -13,6 +13,7 @@ network.error.http=HTTP connection error.
|
|||
|
||||
conference.invite.message=Join my conference.
|
||||
buddy.invite.message=Would you be my chat buddy?
|
||||
buddy.auth.defaultGroup=Contacts
|
||||
|
||||
# Some options are commented out because they aren't used. We do the same thing
|
||||
# to their description strings.
|
||||
|
|
|
@ -861,9 +861,13 @@ const YahooPacketHandler = {
|
|||
packet.addValue(334, 0);
|
||||
this._session.sendBinaryData(packet.toArrayBuffer());
|
||||
|
||||
// TODO - Possibly allow different tags to be used.
|
||||
this._account.addBuddy(Services.tags.createTag("Friends"),
|
||||
this.userName);
|
||||
// If someone wants to add us as a buddy, place them under the default
|
||||
// "Contacts" tag. Also, we make sure that the buddy doesn't already
|
||||
// exist in the list in case of a server acknowledgement.
|
||||
if (!this._account.hasBuddy(this.userName)) {
|
||||
let tag = Services.tags.createTag(_("buddy.auth.defaultGroup"));
|
||||
this._account.addBuddy(tag, this.userName);
|
||||
}
|
||||
},
|
||||
deny: function() {
|
||||
let packet = new YahooPacket(kPacketType.BuddyReqReject, 0,
|
||||
|
|
|
@ -271,7 +271,7 @@ YahooAccount.prototype = {
|
|||
this._conferences.delete(aName);
|
||||
},
|
||||
|
||||
// Called when the user adds a new contact within Instantbird.
|
||||
// Called when the user adds or authorizes a new contact.
|
||||
addBuddy: function(aTag, aName) {
|
||||
let buddy = new YahooAccountBuddy(this, null, aTag, aName);
|
||||
this._buddies.set(buddy.userName, buddy);
|
||||
|
@ -279,6 +279,10 @@ YahooAccount.prototype = {
|
|||
Services.contacts.accountBuddyAdded(buddy);
|
||||
},
|
||||
|
||||
hasBuddy: function(aName) {
|
||||
return this._buddies.has(aName);
|
||||
},
|
||||
|
||||
// Called for each buddy that is sent in a list packet from Yahoo! on login.
|
||||
addBuddyFromServer: function(aTag, aName) {
|
||||
let buddy;
|
||||
|
|
Загрузка…
Ссылка в новой задаче