29 Mar 2019 |
| snow joined the room. | 23:06:12 |
snow | Hello! I was playing with the source of purple-matrix and had a question about it. Is this an alright place to ask? | 23:08:58 |
snow | For more context, there's a part of the flow with matrix_api_start (I suppose more with how it's called in matrixprpl_join_chat) that confuses me. I was going to open an issue, but it's not really a bug... | 23:14:34 |
30 Mar 2019 |
@EionRobb:matrix.org | snow: any more info than that? | 06:29:50 |
snow | Sorry about that! I was trying to build off this PR: https://github.com/matrix-org/purple-matrix/pull/30 and it was mentioned in the review that user_data for the bad_response_callback could be used to grab the room alias instead of trying to parse it from the error. It looks like that "user_data" is the GHashTable *components passed to matrixprpl_join_chat (if I'm wrong, this might explain things), but I get a lot of weirdness when I try to cast user_data to GHashTable*, leading me to believe it's freed before the API call completes. | 06:39:31 |
snow | If it is freed (and it looks like by libpurple), I'm trying to figure out what a good way to get that room alias to the bad_response_callback function would be. I made a hack of sorts to send down a copied alias string, but that a. requires all callbacks be aware of this and free the string, and b. just feels not right, I guess? | 06:43:24 |
snow | I'm still learning the flow of this plugin as I go, so I was mostly wondering if there was something obvious I was missing here. | 06:44:30 |
@EionRobb:matrix.org | is that in room_create_callback() ? | 06:44:36 |
snow | Sorry, which part? | 06:45:19 |
@EionRobb:matrix.org | I'm trying to work out which "user_data" you're meaning | 06:45:58 |
@EionRobb:matrix.org | but yeah, the hash table is destroy'd after the call to join_chat by libpurple | 06:46:34 |
snow | Oh! The user_data I'm mainly referring to is in room_create_callback(). | 06:46:51 |
@EionRobb:matrix.org | yeah ok | 06:47:58 |
@EionRobb:matrix.org | so the hash table is destroy'd not unref'd so you can't even ref it to keep it around | 06:48:11 |
@EionRobb:matrix.org | so might be better to extract the alias, g_strdup() it and then pass that as the userdata instead | 06:50:32 |
snow | Alright, that makes sense then. Although to avoid a memory leak, I'd have to make a wrapper for the matrix_api_start default error_callback to free that string? I suppose it's not the worst, though. | 06:53:11 |
snow | Thank you! | 06:54:06 |
@EionRobb:matrix.org | yeah, that's the one | 06:54:27 |
| deerbard joined the room. | 08:50:05 |
5 Apr 2019 |
| un0 joined the room. | 13:38:20 |
| @freenode_Bob-:matrix.org left the room. | 18:27:26 |
| @freenode_bobby:matrix.org left the room. | 18:27:27 |
| deerbard left the room. | 18:27:27 |
12 Apr 2019 |
| snow left the room. | 07:22:15 |
17 Apr 2019 |
| deerbard joined the room. | 06:58:32 |
23 Apr 2019 |
| poorvdh banned @richvdh:matrix.allmende.io (impersonation, sockpuppet, constant abusive behaviour). | 19:41:40 |
24 Apr 2019 |
| poorvdh banned @hawkowl:matrix.allmende.io (abuse, impersonation, ban evasion). | 20:28:34 |
| poorvdh banned @erikj:tedomum.net (abuse, impersonation, ban evasion). | 20:49:24 |
30 Apr 2019 |
| @freenode_bobby:matrix.org joined the room. | 18:10:26 |
1 May 2019 |
Matthew | chatty tries to speak matrix?! | 17:46:23 |