Changeset 87872c7


Ignore:
Timestamp:
2016-11-28T05:53:50Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
2a1c27f
Parents:
ed1f5e8d
git-author:
dequis <dx@…> (28-11-16 05:52:22)
git-committer:
dequis <dx@…> (28-11-16 05:53:50)
Message:

purple: Use roomlist_room_serialize, fixes joining jabber chats

The room names in 'chat list' were missing the server part.

Jabber is the only prpl which implements this method as far as I can
see, and it's needed to get the full name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    red1f5e8d r87872c7  
    13871387}
    13881388
     1389static char *prplcb_roomlist_get_room_name(PurpleRoomlist *list, PurpleRoomlistRoom *room)
     1390{
     1391        struct im_connection *ic = purple_ic_by_pa(list->account);
     1392        struct purple_data *pd = ic->proto_data;
     1393        PurplePlugin *prpl = purple_plugins_find_with_id(pd->account->protocol_id);
     1394        PurplePluginProtocolInfo *pi = prpl->info->extra_info;
     1395
     1396        if (pi && pi->roomlist_room_serialize) {
     1397                return pi->roomlist_room_serialize(room);
     1398        } else {
     1399                return g_strdup(purple_roomlist_room_get_name(room));
     1400        }
     1401}
     1402
    13891403static void prplcb_roomlist_add_room(PurpleRoomlist *list, PurpleRoomlistRoom *room)
    13901404{
    13911405        bee_chat_info_t *ci;
    1392         const char *title;
     1406        char *title;
    13931407        const char *topic;
    13941408        GList *fields;
     
    13961410
    13971411        fields = purple_roomlist_room_get_fields(room);
    1398         title = purple_roomlist_room_get_name(room);
     1412        title = prplcb_roomlist_get_room_name(list, room);
    13991413
    14001414        if (rld->topic >= 0) {
     
    14051419
    14061420        ci = g_new(bee_chat_info_t, 1);
    1407         ci->title = g_strdup(title);
     1421        ci->title = title;
    14081422        ci->topic = g_strdup(topic);
    14091423        rld->chats = g_slist_prepend(rld->chats, ci);
Note: See TracChangeset for help on using the changeset viewer.