diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-22 18:33:52 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-22 18:33:52 +0100 |
commit | e6880c64f78a505e07c2ba9feb6397d304b5ed27 (patch) | |
tree | fe00a82ee667df7cca5aa2e5f906520b5cb221a0 /libmatrix.c | |
parent | 0ecf274fefae97a5ee944107bc361d6836ffba63 (diff) | |
download | purple-matrix-e6880c64f78a505e07c2ba9feb6397d304b5ed27.tar.gz |
Update the room state on first message
Now that we persist the next_batch identifier, we no longer get all of the
state for a room, so we need to explicitly fetch it on initial sync.
Diffstat (limited to 'libmatrix.c')
-rw-r--r-- | libmatrix.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmatrix.c b/libmatrix.c index 147fa5c..c1e696f 100644 --- a/libmatrix.c +++ b/libmatrix.c @@ -83,14 +83,20 @@ static void matrixprpl_close(PurpleConnection *pc) } -/* Get the list of information we need to add a chat to our buddy list */ +/** + * Get the list of information we need to add a chat to our buddy list. + * + * The first entry is special, and represents the unique "name" by which the + * chat is identified in the buddy list with purple_blist_find_chat. In our case + * that is room_id. + */ static GList *matrixprpl_chat_info(PurpleConnection *gc) { struct proto_chat_entry *pce; /* defined in prpl.h */ pce = g_new0(struct proto_chat_entry, 1); pce->label = _("Room id"); - pce->identifier = PRPL_CHAT_INFO_ROOM_ID; + pce->identifier = PRPL_CHAT_INFO_ROOM_ID; pce->required = TRUE; return g_list_append(NULL, pce); |