Innocent Bystander
Innocent Bystander
we've implemented a [workaround](https://github.com/nylonee/hangupsbot/blob/workaround/unknown-names/hangupsbot/plugins/testing_userlist.py) for the "unknown user" issue by populating a global `_user_list` within our bot, then using [`getentitybyid`](https://github.com/tdryer/hangups/blob/master/hangups/client.py#L604) to refresh users that show up as unknown. the list...
i've "merged" the workaround [previously posted](https://github.com/tdryer/hangups/issues/4#issuecomment-89276704) into a hangups fork for testing purposes, the latest commit being this: https://github.com/endofline/hangups/commit/3726795f571c18acfccff4b171c77387c30d6fc8 (https://github.com/endofline/hangups/tree/workaround/fallback-user)
@tdryer i just pulled and built the latest master, the user list still seems to contain "Unknown" , but no longer has "unknown". do you require additional logs for debugging?
my mistake again @tdryer - didn't examine the change at `hangups/ui/__main__.py`, which for the record is: ``` self._user_list = hangups.UserList(self._client, initial_data.self_entity, initial_data.entities, initial_data.conversation_participants) ``` to ``` self._user_list = yield from...
No more "adding fallback user"s - the userlist appears clean now (except for that missing g+ profile), haven't quite tested membership changes yet
To add to this issue, since hangups ConversationList is generally incomplete, we occasionally receive the following exception in the log: "Received ClientWatermarkNotification for unknown conversation XXXYYYZZZ" when an event is...
In the end, we added an observer to [client.on_state_update](https://github.com/tdryer/hangups/blob/master/hangups/client.py#L70) so that we can receive `state_update.typing_notification` and `state_update.watermark_notification` to receive the events prior to them being handled by ConversationList event handlers
Partial example of the structure here for reference purposes: ~~https://github.com/hangoutsbot/hangoutsbot/wiki/Reference:-hangups-state_update-dumps~~ **page moved:** https://github.com/hangoutsbot/hangoutsbot/wiki/hangups-state_update-dumps
Just to add as an FYI (no action required) - I've heard of hangoutsbot admins running this at over >300 conversations - its possible because the bot uses private 1-to-1...
- [example plugin that watches membership](https://github.com/hangoutsbot/hangoutsbot/blob/staging/hangupsbot/plugins/_example_watchmembers.py) - [basic usage of bot._client.adduser()](https://github.com/hangoutsbot/hangoutsbot/blob/staging/hangupsbot/plugins/convtools.py#L42) - the [actual monkeypatched function it calls](https://github.com/hangoutsbot/hangoutsbot/blob/staging/hangupsbot/monkeypatch/otr_support.py#L68) and the [reference function](https://github.com/tdryer/hangups/blob/5ca47c7497c1456e99cef0f8d3dc5fc8c3ffe9df/hangups/client.py#L858) in the hangups client library