aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber.h
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-11-23 14:49:09 -0300
committerdequis <dx@dxzone.com.ar>2015-11-23 14:49:09 -0300
commit9c8dbc75d416c8867be20ccf3732303163e620ce (patch)
treea714f5af6ca4a17db97981036c0f79ae5ffda7fd /protocols/jabber/jabber.h
parentc34247d0b3111f16dae1a52d831df0d61c03ee35 (diff)
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.
Diffstat (limited to 'protocols/jabber/jabber.h')
-rw-r--r--protocols/jabber/jabber.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index 75bd123f..b50e0cb5 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -112,6 +112,8 @@ struct jabber_data {
GSList *filetransfers;
GSList *streamhosts;
int have_streamhosts;
+
+ char *muc_host;
};
struct jabber_away_state {
@@ -357,5 +359,7 @@ void jabber_chat_invite(struct groupchat *c, char *who, char *message);
int jabber_get_hipchat_profile(struct im_connection *ic);
xt_status jabber_parse_hipchat_profile(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
xt_status hipchat_handle_success(struct im_connection *ic, struct xt_node *node);
+char *hipchat_make_channel_slug(const char *name);
+char *hipchat_guess_channel_name(struct im_connection *ic, const char *name);
#endif