Merge lp:~stefanor/ibid/memo-336566 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 591
Merged at revision: 601
Proposed branch: lp:~stefanor/ibid/memo-336566
Merge into: lp:~ibid-core/ibid/old-trunk-pack-0.92
Diff against target: None lines
To merge this branch: bzr merge lp:~stefanor/ibid/memo-336566
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Review via email: mp+5690@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefano Rivera (stefanor) wrote :

Another branch hijack

Revision history for this message
Michael Gorven (mgorven) wrote :

Those SA relations are hacky but actually work!
 review approve

review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ibid/plugins/memo.py'
--- ibid/plugins/memo.py 2009-03-18 11:36:41 +0000
+++ ibid/plugins/memo.py 2009-04-18 22:51:13 +0000
@@ -36,8 +36,8 @@
36 self.private = private36 self.private = private
37 self.delivered = False37 self.delivered = False
3838
39Memo.sender = relation(Identity, primaryjoin=Memo.from_id==Identity.id)39Identity.memos_sent = relation(Memo, primaryjoin=Identity.id==Memo.from_id, backref='sender')
40Memo.recipient = relation(Identity, primaryjoin=Memo.to_id==Identity.id)40Identity.memos_recvd = relation(Memo, primaryjoin=Identity.id==Memo.to_id, backref='recipient')
4141
42class Tell(Processor):42class Tell(Processor):
43 u"""(tell|pm|privmsg|msg) <person> <message>"""43 u"""(tell|pm|privmsg|msg) <person> <message>"""
@@ -60,8 +60,10 @@
60 if not identity:60 if not identity:
61 identity = account.identities[0]61 identity = account.identities[0]
62 if not to:62 if not to:
63 event.addresponse(u"I don't know who %s is", who)63 to = Identity(event.source, who)
64 return64 session.save(to)
65 session.flush()
66 log.info(u"Created identity %s for %s on %s", to.id, to.identity, to.source)
6567
66 if permission(u'recvmemo', to.account and to.account.id or None, to.source) != 'yes':68 if permission(u'recvmemo', to.account and to.account.id or None, to.source) != 'yes':
67 event.addresponse(u'Just tell %s yourself', who)69 event.addresponse(u'Just tell %s yourself', who)
6870
=== modified file 'scripts/ibid-plugin'
--- scripts/ibid-plugin 2009-03-16 20:55:20 +0000
+++ scripts/ibid-plugin 2009-03-19 19:25:22 +0000
@@ -46,6 +46,7 @@
4646
47class TestSource(dict):47class TestSource(dict):
48 type = 'test'48 type = 'test'
49 permissions = []
4950
50ibid.sources[u'test_source'] = TestSource()51ibid.sources[u'test_source'] = TestSource()
5152

Subscribers

People subscribed via source and target branches