Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- createTag: function(aTagName) {
- return Components.classes["@instantbird.org/purple/tags-service;1"]
- .getService(Ci.imITagsService)
- .createTag(aTagName);
- },
- getBuddy: function(normalizedName) {
- return Components.classes["@instantbird.org/purple/contacts-service;1"]
- .getService(Ci.imIContactsService)
- .getBuddyByNameAndProtocol(normalizedName, this.protocol);
- },
- addBuddy: function(aTagName, aName) {
- var b = this.getBuddy(normalize(aName), this.protocol);
- var buddy;
- var tag = this.createTag(aTagName);
- dump(b);
- if(b) {
- buddy = new AccountBuddy(this, b, tag);
- } else {
- buddy = new AccountBuddy(this, null, tag, aName);
- Components.classes["@instantbird.org/purple/contacts-service;1"]
- .getService(Ci.imIContactsService)
- .accountBuddyAdded(buddy);
- }
- buddy.setStatus(Ci.imIStatusInfo.STATUS_AVAILABLE, 'wowzaaa', 10);
- this._buddies[normalize(aName)] = buddy;
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement