Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Sending m.room.member and m.presence events again after changing avatar or displayname #157

Open
farodin91 opened this issue Jan 10, 2017 · 3 comments

Comments

@farodin91
Copy link
Member

See http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#events-on-change-of-profile-information

@jooert
Copy link

jooert commented Mar 21, 2017

Perhaps I'm misunderstanding something here, but isn't that already implemented? Avatar and display name can only be changed through the /profile API and the handlers for PutAvatarUrl and PutDisplayName both call models::profile::Profile::update_memberships which then calls RoomMembership::update which finally emits an m.room.member event.

@mujx
Copy link

mujx commented Mar 22, 2017

@jooert Seems you are right regarding the m.room.member event. Reading through the code the issue seems to be about the m.presence event also.

The problems is in PresenceStatus::upsert which is called after a profile update. Here we create the event_id but we don't use it to create the actual event in PresenceStatus::update (like we do in PresenceStatus::create) which leave us with a dangling event_id.

@mujx mujx changed the title Sending a m.room.member event again after changing avatar or displayname Sending a m.room.member and m.presence events again after changing avatar or displayname Mar 22, 2017
@mujx mujx changed the title Sending a m.room.member and m.presence events again after changing avatar or displayname Sending m.room.member and m.presence events again after changing avatar or displayname Mar 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants