Ignore:
Timestamp:
2016-09-24T14:53:52Z (8 years ago)
Author:
dx <dx@…>
Branches:
master
Children:
985d66d
Parents:
ad54149
git-author:
Eion Robb <eion@…> (24-09-16 14:53:52)
git-committer:
dx <dx@…> (24-09-16 14:53:52)
Message:

purple: support setting chat room topics (#84)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    rad54149 r524e931  
    684684}
    685685
     686void purple_chat_set_topic(struct groupchat *gc, char *topic)
     687{
     688        PurpleConversation *pc = gc->data;
     689        PurpleConvChat *pcc = PURPLE_CONV_CHAT(pc);
     690        struct purple_data *pd = gc->ic->proto_data;
     691        PurplePlugin *prpl = purple_plugins_find_with_id(pd->account->protocol_id);
     692        PurplePluginProtocolInfo *pi = prpl->info->extra_info;
     693
     694        if (pi->set_chat_topic) {
     695                pi->set_chat_topic(purple_account_get_connection(pd->account),
     696                                   purple_conv_chat_get_id(pcc),
     697                                   topic);
     698        }
     699}
     700
    686701void purple_chat_kick(struct groupchat *gc, char *who, const char *message)
    687702{
     
    16521667        funcs.chat_with = purple_chat_with;
    16531668        funcs.chat_invite = purple_chat_invite;
     1669        funcs.chat_topic = purple_chat_set_topic;
    16541670        funcs.chat_kick = purple_chat_kick;
    16551671        funcs.chat_leave = purple_chat_leave;
Note: See TracChangeset for help on using the changeset viewer.