BatchUpdate: Add more helper methods
Add new helper methods: - getAccount - getAccountId - getIdentifiedUser which will reduce the amount of code at call sites, for example: ctx.getAccount(); instead of: ctx.getUser().asIdentifiedUser().getAccount(); Change-Id: I946002e1cf70a77bc1fe3879edf5717ecac77fb7
This commit is contained in:
@@ -119,7 +119,7 @@ public class PutTopic implements RestModifyView<ChangeResource, Input>,
|
||||
new ChangeMessage.Key(
|
||||
change.getId(),
|
||||
ChangeUtil.messageUUID(ctx.getDb())),
|
||||
ctx.getUser().getAccountId(), ctx.getWhen(),
|
||||
ctx.getAccountId(), ctx.getWhen(),
|
||||
change.currentPatchSetId());
|
||||
cmsg.setMessage(summary);
|
||||
cmUtil.addChangeMessage(ctx.getDb(), update, cmsg);
|
||||
@@ -130,7 +130,7 @@ public class PutTopic implements RestModifyView<ChangeResource, Input>,
|
||||
public void postUpdate(Context ctx) {
|
||||
if (change != null) {
|
||||
topicEdited.fire(change,
|
||||
ctx.getUser().asIdentifiedUser().getAccount(),
|
||||
ctx.getAccount(),
|
||||
oldTopicName,
|
||||
ctx.getWhen());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user