[Code-review] review of Daf's view gadget branch
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Jun 25 08:09:58 EDT 2008
Le mardi 24 juin 2008 à 12:57 +0200, Guillaume Desmottes a écrit :
> Review of
> https://dev.laptop.org/git?p=users/daf/gadget;a=shortlog;h=view
>
>
>
> > diff --git a/gadget/component.py b/gadget/component.py
> > index 2d42555..8e16ccc 100644
> > --- a/gadget/component.py
> > +++ b/gadget/component.py
> > @@ -116,8 +116,13 @@ class ActivityViewHandler(object):
> > self.gadget.send(message)
> >
> > def activity_gone(self, activity):
> > - # FIXME: send remove message
> > - pass
> > + message = domish.Element((None, 'message'))
> > + added = message.addElement((ns.ACTIVITY, 'removed'))
> > + added['id'] = self.id
> > + activity_elem = added.addElement((ns.ACTIVITY, 'activity'))
> > + activity_elem['id'] = str(activity.id)
> > + activity_elem['room'] = activity.room
> > + self.gadget.send(message)
> >
>
> Humm this message doesn't have any 'to' and 'from' attribute.
> We should set self.contact as 'to' attribute and we currently use
> "gadget.parent.jabberId" to find Gadget's jid.
>
> Same for activity_found.
>
activity_found should include activity members in the stanza too.
G.
More information about the Code-review
mailing list