Ignore:
Timestamp:
2015-11-23T17:49:09Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
ad9ac5d
Parents:
c34247d
Message:

hipchat: 'chat add hipchat "channel name"' now tries to guess the JID

It's basically prepending the organization id, appending the default MUC
host from the success packet, and generating a slug based on the name
for the middle part, which is replacing a few characters with
underscores and doing a unicode aware lowercasing.

Includes tests, which are useless other than validating the initial
implementation with the test vectors that i already tested manually.
Guaranteed to detect zero breakages in the future. Good test code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.h

    rc34247d r9c8dbc7  
    113113        GSList *streamhosts;
    114114        int have_streamhosts;
     115
     116        char *muc_host;
    115117};
    116118
     
    358360xt_status jabber_parse_hipchat_profile(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
    359361xt_status hipchat_handle_success(struct im_connection *ic, struct xt_node *node);
     362char *hipchat_make_channel_slug(const char *name);
     363char *hipchat_guess_channel_name(struct im_connection *ic, const char *name);
    360364
    361365#endif
Note: See TracChangeset for help on using the changeset viewer.